mirror of
https://github.com/Z3Prover/z3
synced 2025-06-23 14:23:40 +00:00
fix smt-lib 2.5 double quotes in pp
This commit is contained in:
parent
8e962aa427
commit
889b6be2c3
1 changed files with 4 additions and 1 deletions
|
@ -317,7 +317,10 @@ format * smt2_pp_environment::pp_str_literal(app * t) {
|
||||||
// we want to scan strVal and escape every non-printable character
|
// we want to scan strVal and escape every non-printable character
|
||||||
for (unsigned int i = 0; i < strVal.length(); ++i) {
|
for (unsigned int i = 0; i < strVal.length(); ++i) {
|
||||||
char c = strVal.at(i);
|
char c = strVal.at(i);
|
||||||
if (isprint(c)) {
|
if (c == '"') {
|
||||||
|
// SMT-LIB 2.5 string escape
|
||||||
|
buf << "\"\"";
|
||||||
|
} else if (isprint(c)) {
|
||||||
buf << c;
|
buf << c;
|
||||||
} else if (c == '\a') {
|
} else if (c == '\a') {
|
||||||
buf << "\\a";
|
buf << "\\a";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue