Scrub comments: skip the second chracter in the escape sequence

Fixes #5016
This commit is contained in:
Jakub Valtar
2017-04-21 12:35:52 +02:00
parent 3b12eaff08
commit c2e0cb9705

View File

@@ -730,10 +730,16 @@ public class PdePreprocessor {
throw new RuntimeException("Missing the */ from the end of a " +
"/* comment */");
}
} else if (p[index] == '"' && index > 0 && p[index-1] != '\\') {
// switch in/out of quoted region
} else if (p[index] == '"') {
insideQuote = !insideQuote;
index++;
// skip the escaped char
} else if (insideQuote && p[index] == '\\') {
index += 2;
} else { // any old character, move along
index++;
}