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:
parent
88362a1c3a
commit
01cb20e098
1 changed files with 22 additions and 14 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue