From 8d9b7e9bf35b0c78ff8d1c4e492effbad845bdcc Mon Sep 17 00:00:00 2001 From: "Sunrim KIM (keen)" <3han5chou7@gmail.com> Date: Sun, 29 Jun 2014 13:46:46 +0900 Subject: [PATCH] ensure flush contents into the port made in `open-input-bytevector` --- src/port.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/port.c b/src/port.c index 168b5cce..2da85177 100644 --- a/src/port.c +++ b/src/port.c @@ -329,6 +329,8 @@ pic_port_open_input_blob(pic_state *pic) port->status = PIC_PORT_OPEN; xfwrite(blob->data, 1, blob->len, port->file); + xfflush(port->file); + xrewind(port->file); return pic_obj_value(port); }