summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-04-19 06:32:17 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-04-19 06:32:17 -0700
commitdd15f9af726b56462fcf243f72bf4a44a10e6762 (patch)
tree882c2a51fba67d47c775de8b82ad0d32ea5d1ac8
parent264e840b7e10ad7bc28e8649fa841364223e56fa (diff)
downloadtxr-dd15f9af726b56462fcf243f72bf4a44a10e6762.tar.gz
txr-dd15f9af726b56462fcf243f72bf4a44a10e6762.tar.bz2
txr-dd15f9af726b56462fcf243f72bf4a44a10e6762.zip
Fix broken unget_char over string input streams.
* stream.c (string_in_unget_char): Store the updated position into the stream, rather than the original value, which does nothing.
-rw-r--r--stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stream.c b/stream.c
index 45609677..b4d9555e 100644
--- a/stream.c
+++ b/stream.c
@@ -1568,7 +1568,7 @@ static val string_in_unget_char(val stream, val ch)
lit("unget-char: ~s doesn't match the character that was read"),
nao);
- set(mkloc(s->pos, stream), plus(pos, one));
+ set(mkloc(s->pos, stream), pos);
return ch;
}