summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--stream.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 016c7ac4..d26d23ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-07-10 Kaz Kylheku <kaz@kylheku.com>
+
+ Fix unget-byte and unget-char on catenated streams.
+
+ * stream.c (cat_unget_byte, cat_unget_char): Recursive
+ call to unget_byte and unget_char with reversed arguments.
+
2015-07-09 Kaz Kylheku <kaz@kylheku.com>
Parser cleanup: embed scanner in parser.
diff --git a/stream.c b/stream.c
index 399d341e..0f806401 100644
--- a/stream.c
+++ b/stream.c
@@ -2896,7 +2896,7 @@ static val cat_unget_byte(val stream, int byte)
stream, nao);
} else {
val stream = car(streams);
- return unget_byte(stream, num_fast(byte));
+ return unget_byte(num_fast(byte), stream);
}
return nil;
@@ -2912,7 +2912,7 @@ static val cat_unget_char(val stream, val ch)
stream, nao);
} else {
val stream = car(streams);
- return unget_char(stream, ch);
+ return unget_char(ch, stream );
}
}