summaryrefslogtreecommitdiffstats
path: root/lem/io/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'lem/io/file.c')
-rw-r--r--lem/io/file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lem/io/file.c b/lem/io/file.c
index d820363..5bdce06 100644
--- a/lem/io/file.c
+++ b/lem/io/file.c
@@ -374,6 +374,9 @@ file_seek(lua_State *T)
if (f->a.T != NULL)
return io_busy(T);
+ /* flush input buffer */
+ lem_inputbuf_init(&f->buf);
+
f->seek.whence = mode[op];
lem_async_do(&f->a, T, file_seek_work, file_seek_reap);