]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/common/unzip.c
fix some more warnings
[xonotic/netradiant.git] / tools / quake3 / common / unzip.c
index 41b09cb33b52a7b1c370fccf0f6af7a8982a3560..1e2be2be5f121af516f4fb92cce822761eb28ac9 100644 (file)
@@ -1261,7 +1261,8 @@ static int unzlocal_getShort (FILE* fin, uLong *pX)
 {
        short   v;
 
-       fread( &v, sizeof(v), 1, fin );
+       if(fread( &v, sizeof(v), 1, fin ) != 1)
+               return UNZ_EOF;
 
        *pX = __LittleShort( v);
        return UNZ_OK;
@@ -1290,7 +1291,8 @@ static int unzlocal_getLong (FILE *fin, uLong *pX)
 {
        int             v;
 
-       fread( &v, sizeof(v), 1, fin );
+       if(fread( &v, sizeof(v), 1, fin ) != 1)
+               return UNZ_EOF;
 
        *pX = __LittleLong( v);
        return UNZ_OK;