diff --git a/src/string.c b/src/string.c index a8e26de9..639c3c4c 100644 --- a/src/string.c +++ b/src/string.c @@ -169,8 +169,9 @@ SCM read_string (SCM port) /*:((arity . n)) */ { int fd = __stdin; - if (TYPE (port) == TPAIR && TYPE (car (port)) == TNUMBER) - __stdin = VALUE (CAR (port)); + if (TYPE (port) == TPAIR) + if (TYPE (car (port)) == TNUMBER) + __stdin = VALUE (CAR (port)); int c = readchar (); size_t i = 0; while (c != -1)