summaryrefslogtreecommitdiffstats
path: root/stream.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-01-14 07:07:33 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-01-14 07:07:33 -0800
commit0b519285f0a3289efa1d7671f949171f47d53151 (patch)
tree55d8d140076a8d951b2e1371c263c66964dffc64 /stream.c
parent28bd257494d8a0a6337d6fdd06b820412a2f1c55 (diff)
downloadtxr-0b519285f0a3289efa1d7671f949171f47d53151.tar.gz
txr-0b519285f0a3289efa1d7671f949171f47d53151.tar.bz2
txr-0b519285f0a3289efa1d7671f949171f47d53151.zip
* stream.c (stdio_seek): After a successful seek, discard the character
that may have been put back with unget_char.
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/stream.c b/stream.c
index f51483a2..64d217a4 100644
--- a/stream.c
+++ b/stream.c
@@ -270,6 +270,7 @@ static val stdio_seek(val stream, cnum offset, enum strm_whence whence)
} else {
if (fseek(h->f, offset, whence) == 0) {
utf8_decoder_init(&h->ud);
+ h->unget_c = nil;
return t;
}
}