One or two digit octal escapes are legal

This commit is contained in:
Wilson Snyder 2008-06-27 17:52:45 -04:00
parent d6884db439
commit d962dfe48c

View File

@ -1463,8 +1463,12 @@ string V3Parse::deQuote(FileLine* fileline, string text) {
} }
} else { } else {
if (octal_digits) { if (octal_digits) {
fileline->v3error("Non-three digit octal escape code (\\###)"); // Spec allows 1-3 digits
octal_digits = 0; octal_digits = 0;
quoted = false;
newtext += octal_val;
--cp; // Backup to reprocess terminating character as non-escaped
continue;
} }
quoted = false; quoted = false;
if (*cp == 'n') newtext += '\n'; if (*cp == 'n') newtext += '\n';