]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/fgets.c
The spans do now contain the size of a span, no longer the end offset.
[cc65] / libsrc / common / fgets.c
index ab755616a49990cfd3dd0e66f1e4105c63a3dffc..e65fb4bc8e28ef0849a7acf03bc2a17167574b3c 100644 (file)
@@ -25,8 +25,7 @@ char* __fastcall__ fgets (char* s, unsigned size, FILE* f)
 
     if (size == 0) {
         /* Invalid size */
-        _errno = EINVAL;
-        return 0;
+        return (char*) _seterrno (EINVAL);
     }
 
     /* Read input */