Skip to content

Commit ea74d38

Browse files
committed
fix quote escaping
1 parent 9f89909 commit ea74d38

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ritobin/text_write.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ namespace ritobin {
9191
write_raw("\"");
9292
for (char c : str) {
9393
if (c == '\t') { write_raw("\\t"); }
94-
else if (c == '\n') { write_raw("\\n"); }
94+
else if (c == '\n') { write_raw("\\n"); }
9595
else if (c == '\r') { write_raw("\\r"); }
9696
else if (c == '\b') { write_raw("\\b"); }
9797
else if (c == '\f') { write_raw("\\f"); }
9898
else if (c == '\\') { write_raw("\\\\"); }
99-
else if (c == '"') { write_raw("\""); }
99+
else if (c == '"') { write_raw("\\\""); }
100100
else if (c < 0x20 || c > 0x7E) {
101101
constexpr char digits[] = "0123456789abcdef";
102102
char hex[] = {

0 commit comments

Comments
 (0)