From b286cdf2b4bed3d906691fdb6eff6db6f6e3846e Mon Sep 17 00:00:00 2001 From: izydorst Date: Sun, 11 Aug 2002 14:38:00 +0000 Subject: [PATCH] fixed error check git-svn-id: svn://svn.cc65.org/cc65/trunk@1388 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/grc/grc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5