From c2eac57529777d5466c2ca4bcc26bb657a9cd5b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Sun, 15 Nov 2015 09:58:38 -0300 Subject: [PATCH] (retro_file) Fix fseek() --- libretro-common/file/retro_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretro-common/file/retro_file.c b/libretro-common/file/retro_file.c index 26775131b7..564e84deb7 100644 --- a/libretro-common/file/retro_file.c +++ b/libretro-common/file/retro_file.c @@ -310,13 +310,13 @@ ssize_t retro_fseek(RFILE *stream, ssize_t offset, int whence) break; } - return 0; + return stream->mappos; } else #endif { ret = lseek(stream->fd, offset, whence); - return ret == -1 ? -1 : 0; + return ret < 0 ? -1 : ret; } #endif }