]> git.sur5r.net Git - cc65/commitdiff
fixed error check
authorizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 11 Aug 2002 14:38:00 +0000 (14:38 +0000)
committerizydorst <izydorst@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 11 Aug 2002 14:38:00 +0000 (14:38 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1388 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/grc/grc.c

index d880cec532d8561150fcd2eafbea67eb949de1c7..952586721c69b3ec0e893983c77a109a28cf662a 100644 (file)
@@ -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;