From e8668a5c7177f2438ef37f75a41d80333392df3d Mon Sep 17 00:00:00 2001 From: Filipe Azevedo Date: Mon, 15 Aug 2022 17:48:09 +0200 Subject: [PATCH] rzipstream_tell: Fix missing tell for non compressed files (#14313) The tell call would always return the compressed stream position. --- libretro-common/streams/rzip_stream.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libretro-common/streams/rzip_stream.c b/libretro-common/streams/rzip_stream.c index dd6ca20c07..686e793e24 100644 --- a/libretro-common/streams/rzip_stream.c +++ b/libretro-common/streams/rzip_stream.c @@ -1023,7 +1023,9 @@ int64_t rzipstream_tell(rzipstream_t *stream) if (!stream) return -1; - return (int64_t)stream->virtual_ptr; + if (stream->is_compressed) + return (int64_t)stream->virtual_ptr; + return filestream_tell(stream->file); } /* Returns true if specified RZIP file contains