aboutsummaryrefslogtreecommitdiff
path: root/sys/libn/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/libn/io.c')
-rw-r--r--sys/libn/io.c2
1 files changed, 2 insertions, 0 deletions
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);
}