summaryrefslogtreecommitdiff
path: root/libguile/vports.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/vports.c')
-rw-r--r--libguile/vports.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libguile/vports.c b/libguile/vports.c
index 8c67d8b06..0ee68002b 100644
--- a/libguile/vports.c
+++ b/libguile/vports.c
@@ -117,7 +117,14 @@ sf_fill_buffer (SCM port)
if (SCM_FALSEP (ans) || SCM_EOF_OBJECT_P (ans))
return EOF;
SCM_ASSERT (SCM_ICHRP (ans), ans, SCM_ARG1, "sf_fill_buffer");
- return SCM_ICHR (ans);
+ {
+ scm_port *pt = SCM_PTAB_ENTRY (port);
+
+ *pt->read_buf = SCM_ICHR (ans);
+ pt->read_pos = pt->read_buf;
+ pt->read_end = pt->read_buf + 1;
+ return *pt->read_buf;
+ }
}