Skip to content

Commit

Permalink
cxxrtl: escape double quotes in c strings
Browse files Browse the repository at this point in the history
  • Loading branch information
rroohhh committed Nov 11, 2024
1 parent 7cfc497 commit a730c31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backends/cxxrtl/cxxrtl_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ std::string escape_c_string(const std::string &input)
output.push_back('"');
for (auto c : input) {
if (::isprint(c)) {
if (c == '\\')
if (c == '\\' or c == '"')
output.push_back('\\');
output.push_back(c);
} else {
Expand Down

0 comments on commit a730c31

Please sign in to comment.