diff --git a/src/library/compiler/emit_cpp.cpp b/src/library/compiler/emit_cpp.cpp index 40c99ef0d5..337c4abbfa 100644 --- a/src/library/compiler/emit_cpp.cpp +++ b/src/library/compiler/emit_cpp.cpp @@ -255,6 +255,8 @@ static void emit_quoted_string(std::ostream & out, std::string const & s) { out << "\\t"; else if (c == '\\') out << "\\\\"; + else if (c == '\"') + out << "\\\""; else if (c <= 31 || c >= 0x7f) { out << "\\x"; emit_hexdigit(out, c / 16); emit_hexdigit(out, c % 16); } else {