Skip to content

Commit

Permalink
fix quote escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
moonshadow565 committed Feb 7, 2020
1 parent 9f89909 commit ea74d38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ritobin/text_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ namespace ritobin {
write_raw("\"");
for (char c : str) {
if (c == '\t') { write_raw("\\t"); }
else if (c == '\n') { write_raw("\\n"); }
else if (c == '\n') { write_raw("\\n"); }
else if (c == '\r') { write_raw("\\r"); }
else if (c == '\b') { write_raw("\\b"); }
else if (c == '\f') { write_raw("\\f"); }
else if (c == '\\') { write_raw("\\\\"); }
else if (c == '"') { write_raw("\""); }
else if (c == '"') { write_raw("\\\""); }
else if (c < 0x20 || c > 0x7E) {
constexpr char digits[] = "0123456789abcdef";
char hex[] = {
Expand Down

0 comments on commit ea74d38

Please sign in to comment.