summaryrefslogtreecommitdiff
path: root/src/fs/virtfs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-30 04:34:31 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-30 04:34:31 +0300
commite31cc8b4e05a1d14190c411ae7bd9e240a0809b5 (patch)
treeef8803c8dd3ddd8b17e1556b02c29b96fced0133 /src/fs/virtfs
parent330dc04ab600ac3626bca1626845f59fd4974cc0 (diff)
downloadplus-e31cc8b4e05a1d14190c411ae7bd9e240a0809b5.tar.gz
plus-e31cc8b4e05a1d14190c411ae7bd9e240a0809b5.tar.bz2
plus-e31cc8b4e05a1d14190c411ae7bd9e240a0809b5.tar.xz
plus-e31cc8b4e05a1d14190c411ae7bd9e240a0809b5.zip
Improve VirtFsZip::rwops_size.
Diffstat (limited to 'src/fs/virtfs')
-rw-r--r--src/fs/virtfs/virtfsziprwops.cpp4
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