3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-03 21:01:22 +00:00

Fix for escape sequences in SMT2 scanner

This commit is contained in:
Christoph M. Wintersteiger 2016-01-16 13:53:29 +00:00
parent 88362a1c3a
commit 01cb20e098

View file

@ -179,6 +179,14 @@ namespace smt2 {
return STRING_TOKEN;
}
}
else if (c == '\\') {
next();
c = curr();
if (c == EOF)
throw scanner_exception("unexpected end of string", m_line, m_spos);
if (c != '\\' && c != '\"')
throw scanner_exception("invalid escape sequence", m_line, m_spos);
}
m_string.push_back(c);
next();
}