From af0c1d5ac3960776a4a485ca587744464630e634 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Sun, 24 May 2020 08:06:34 -0700 Subject: contin: in the middle of reorganizing the declaration parsing. check-in before reorganizing keywords --- sys/libn/io.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/libn') diff --git a/sys/libn/io.c b/sys/libn/io.c index 3827a82..8aa4aa0 100644 --- a/sys/libn/io.c +++ b/sys/libn/io.c @@ -54,6 +54,8 @@ io·readln(Stream *s, int n, byte* buf) { byte* b; b = fgets(buf, n+1, s); + if (b == nil) + return -1; return strlen(buf); } -- cgit v1.2.1