diff options
author | ragge <ragge> | 2009-08-09 14:41:49 +0000 |
---|---|---|
committer | ragge <ragge> | 2009-08-09 14:41:49 +0000 |
commit | 6d3bedfde1f54844946cca359b42c1fe14dfdd19 (patch) | |
tree | cb1306bcd3cf5a3eaa8e4ff83eba270fbe1288cd | |
parent | 8d3d9abfd51b04c80fc8cd9c62e9938e96920b5e (diff) |
Line endings with \ were not concatenated to next line iside strings.
Bug spotted by Jonathan Gray.
-rw-r--r-- | token.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -218,10 +218,10 @@ run: ch = NXTCH(); case '\"': /* strings */ str: PUTCH(ch); - while ((ch = NXTCH()) != '\"') { + while ((ch = inch()) != '\"') { PUTCH(ch); if (ch == '\\') { - ch = NXTCH(); + ch = inch(); PUTCH(ch); } if (ch < 0) @@ -604,7 +604,6 @@ again: switch (c = inpch()) { case '\\': /* continued lines */ msdos: if ((c = inpch()) == '\n') { ifiles->lineno++; - putch('\n'); goto again; } else if (c == '\r') goto msdos; |