summaryrefslogtreecommitdiff
path: root/src/printer/smt2/smt2_printer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/printer/smt2/smt2_printer.cpp')
-rw-r--r--src/printer/smt2/smt2_printer.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp
index bf222d189..c3fb3b782 100644
--- a/src/printer/smt2/smt2_printer.cpp
+++ b/src/printer/smt2/smt2_printer.cpp
@@ -791,7 +791,13 @@ static void toStream(std::ostream& out, const DatatypeDeclarationCommand* c) thr
}
static void toStream(std::ostream& out, const CommentCommand* c) throw() {
- out << "(set-info :notes \"" << c->getComment() << "\")";
+ string s = c->getComment();
+ size_t pos = 0;
+ while((pos = s.find_first_of('"', pos)) != string::npos) {
+ s.replace(pos, 1, "\\\"");
+ pos += 2;
+ }
+ out << "(set-info :notes \"" << s << "\")";
}
static void toStream(std::ostream& out, const EmptyCommand* c) throw() {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback