diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-03-30 04:34:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-03-30 04:34:31 +0300 |
commit | e31cc8b4e05a1d14190c411ae7bd9e240a0809b5 (patch) | |
tree | ef8803c8dd3ddd8b17e1556b02c29b96fced0133 | |
parent | 330dc04ab600ac3626bca1626845f59fd4974cc0 (diff) | |
download | plus-e31cc8b4e05a1d14190c411ae7bd9e240a0809b5.tar.gz plus-e31cc8b4e05a1d14190c411ae7bd9e240a0809b5.tar.bz2 plus-e31cc8b4e05a1d14190c411ae7bd9e240a0809b5.tar.xz plus-e31cc8b4e05a1d14190c411ae7bd9e240a0809b5.zip |
Improve VirtFsZip::rwops_size.
-rw-r--r-- | src/fs/virtfs/virtfsziprwops.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fs/virtfs/virtfsziprwops.cpp b/src/fs/virtfs/virtfsziprwops.cpp index be7d85230..24162e129 100644 --- a/src/fs/virtfs/virtfsziprwops.cpp +++ b/src/fs/virtfs/virtfsziprwops.cpp @@ -139,7 +139,9 @@ namespace VirtFsZip { VirtFile *const handle = static_cast<VirtFile *const>( rw->hidden.unknown.data1); - return VirtFs::fileLength(handle); + if (!rw) + return 0; + return handle->mSize; } #endif // USE_SDL2 |