From 3d0657074fbaa6f6bee6533193728c097e1e313f Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sun, 9 Feb 2014 02:41:20 +0900 Subject: [PATCH] first argument of get-output-string is optinoal --- src/port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/port.c b/src/port.c index 7e934dae..2ee95807 100644 --- a/src/port.c +++ b/src/port.c @@ -262,11 +262,11 @@ pic_port_open_output_string(pic_state *pic) static pic_value pic_port_get_output_string(pic_state *pic) { - struct pic_port *port; + struct pic_port *port = pic_stdout(pic);; long endpos; char *buf; - pic_get_args(pic, "p", &port); + pic_get_args(pic, "|p", &port); assert_port_profile(port, PIC_PORT_OUT | PIC_PORT_TEXT, PIC_PORT_OPEN, "read-char");