From 650281039c7cb11cf089a86dc82830a347ae8784 Mon Sep 17 00:00:00 2001 From: Ganesh Viswanathan Date: Fri, 28 Aug 2020 16:08:11 -0500 Subject: [PATCH] Fix preprocessing bug --- nimterop/toastlib/getters.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nimterop/toastlib/getters.nim b/nimterop/toastlib/getters.nim index 8a4586d..f0a4735 100644 --- a/nimterop/toastlib/getters.nim +++ b/nimterop/toastlib/getters.nim @@ -333,7 +333,8 @@ proc getPreprocessor*(gState: State, fullpath: string) = while true: if outp.readLine(line): # We want to keep blank lines here for comment processing - if line.len > 1 and line[0] == '#' and line[1] == ' ': + if line.len > 10 and line[0] == '#' and line[1] == ' ' and line.contains('"'): + # # 1 "path/to/file.h" 1 start = false line = line.split('"')[1].sanitizePath(noQuote = true) if sfile == line or