projects
/
cvc5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65fb43f
)
Fix for quote-escaping in smt2 printer
author
Morgan Deters
<mdeters@cs.nyu.edu>
Sat, 18 Jan 2014 03:59:39 +0000
(22:59 -0500)
committer
Morgan Deters
<mdeters@cs.nyu.edu>
Sat, 18 Jan 2014 04:00:26 +0000
(23:00 -0500)
src/printer/smt2/smt2_printer.cpp
patch
|
blob
|
history
diff --git
a/src/printer/smt2/smt2_printer.cpp
b/src/printer/smt2/smt2_printer.cpp
index b743ba70e695fc8812d7db33aae8bdbd2109c37a..4b36b454857ebece4a8d23270107f8911a3d1f84 100644
(file)
--- a/
src/printer/smt2/smt2_printer.cpp
+++ b/
src/printer/smt2/smt2_printer.cpp
@@
-960,9
+960,10
@@
static void toStream(std::ostream& out, const CommandUnsupported* s) throw() {
static void toStream(std::ostream& out, const CommandFailure* s) throw() {
string message = s->getMessage();
// escape all double-quotes
- size_t pos;
- while((pos = message.find('"')) != string::npos) {
+ size_t pos
= 0
;
+ while((pos = message.find('"'
, pos
)) != string::npos) {
message = message.replace(pos, 1, "\\\"");
+ pos += 2;
}
out << "(error \"" << message << "\")" << endl;
}