From: izydorst Date: Sun, 11 Aug 2002 14:38:00 +0000 (+0000) Subject: fixed error check X-Git-Tag: V2.12.0~2239 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b286cdf2b4bed3d906691fdb6eff6db6f6e3846e;p=cc65 fixed error check git-svn-id: svn://svn.cc65.org/cc65/trunk@1388 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/grc/grc.c b/src/grc/grc.c index d880cec53..952586721 100644 --- a/src/grc/grc.c +++ b/src/grc/grc.c @@ -104,7 +104,7 @@ int blocks,rest; Error("couldn't open %s:%s\n",argv[i],strerror(errno)); bytes = fread(buffer,1,BLOODY_BIG_BUFFER,input); fclose(input); - if (bytes<0) + if (bytes==0) Error("couldn't read %s:%s\n",argv[i],strerror(errno)); blocks = bytes / 254; rest = bytes % 254 + 2;