diff options
author | Max Horn | 2008-09-23 10:10:29 +0000 |
---|---|---|
committer | Max Horn | 2008-09-23 10:10:29 +0000 |
commit | 65ef827349870eac5072d9a104b8a2d7ebc3ef07 (patch) | |
tree | 31067bfbba571bb480d2abe01265452f1f92f3a4 /common | |
parent | 20aea4e5fa8308a77450fa8c1584a78c60671364 (diff) | |
download | scummvm-rg350-65ef827349870eac5072d9a104b8a2d7ebc3ef07.tar.gz scummvm-rg350-65ef827349870eac5072d9a104b8a2d7ebc3ef07.tar.bz2 scummvm-rg350-65ef827349870eac5072d9a104b8a2d7ebc3ef07.zip |
Perform error checking when reading from a ZIP file
svn-id: r34634
Diffstat (limited to 'common')
-rw-r--r-- | common/unzip.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/unzip.cpp b/common/unzip.cpp index 1f70996c39..054200e7a2 100644 --- a/common/unzip.cpp +++ b/common/unzip.cpp @@ -386,12 +386,12 @@ typedef struct { */ static int unzlocal_getShort(Common::File &fin, uLong *pX) { *pX = fin.readUint16LE(); - return UNZ_OK; + return fin.ioFailed() ? UNZ_ERRNO : UNZ_OK; } static int unzlocal_getLong(Common::File &fin, uLong *pX) { *pX = fin.readUint32LE(); - return UNZ_OK; + return fin.ioFailed() ? UNZ_ERRNO : UNZ_OK; } |