diff options
-rw-r--r-- | src/passes/Print.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 64cea8bb2..14ef584be 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -36,10 +36,10 @@ static bool isFullForced() { static std::ostream& printName(Name name, std::ostream& o) { // we need to quote names if they have tricky chars - if (strpbrk(name.str, "()")) { - o << '"' << name << '"'; - } else { + if (!name.str || !strpbrk(name.str, "()")) { o << name; + } else { + o << '"' << name << '"'; } return o; } |