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.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp
index 380004d02..66d36fe4c 100644
--- a/src/printer/smt2/smt2_printer.cpp
+++ b/src/printer/smt2/smt2_printer.cpp
@@ -91,7 +91,11 @@ void Smt2Printer::toStream(
static std::string maybeQuoteSymbol(const std::string& s) {
// this is the set of SMT-LIBv2 permitted characters in "simple" (non-quoted) symbols
- if(s.find_first_not_of("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~!@$%^&*_-+=<>.?/") != string::npos) {
+ if (s.find_first_not_of("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
+ "0123456789~!@$%^&*_-+=<>.?/")
+ != string::npos
+ || s.empty())
+ {
// need to quote it
stringstream ss;
ss << '|' << s << '|';
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback