Skip to content

Commit

Permalink
cxxrtl: backend: don't drop bits 2 and 5 on non-printable format.
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed Aug 27, 2024
1 parent 94913a9 commit d0da1b5
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 @@ -616,7 +616,7 @@ std::string escape_c_string(const std::string &input)
output.push_back('\\');
output.push_back(c);
} else {
char l = c & 0x3, m = (c >> 3) & 0x3, h = (c >> 6) & 0x3;
char l = c & 0x7, m = (c >> 3) & 0x7, h = (c >> 6) & 0x3;
output.append("\\");
output.push_back('0' + h);
output.push_back('0' + m);
Expand Down

0 comments on commit d0da1b5

Please sign in to comment.