From e31cc8b4e05a1d14190c411ae7bd9e240a0809b5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 30 Mar 2017 04:34:31 +0300 Subject: Improve VirtFsZip::rwops_size. --- src/fs/virtfs/virtfsziprwops.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/fs') 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( rw->hidden.unknown.data1); - return VirtFs::fileLength(handle); + if (!rw) + return 0; + return handle->mSize; } #endif // USE_SDL2 -- cgit v1.2.3-70-g09d2