summaryrefslogtreecommitdiffstats
path: root/apps/plugins/mikmod/mmio.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-08-25 20:10:10 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-08-25 20:10:10 -0400
commit099bde885d8ef81ee3cbf96dadee72b5c5e9a8c7 (patch)
tree37bb0a07c2beb3f689b6b089decafcc743ed6080 /apps/plugins/mikmod/mmio.c
parent7972f8e4480471c43dd8c72c9e114a642fb8ff14 (diff)
downloadrockbox-099bde885d.tar.gz
rockbox-099bde885d.tar.bz2
rockbox-099bde885d.zip
mikmod: Fix emulated fseek()
Was causing XM loader to fail Change-Id: I1dd1d87dd0d8587fae5f9db04a730fc42b625a11
Diffstat (limited to 'apps/plugins/mikmod/mmio.c')
-rw-r--r--apps/plugins/mikmod/mmio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/mikmod/mmio.c b/apps/plugins/mikmod/mmio.c
index 023c56baef..6e317ca008 100644
--- a/apps/plugins/mikmod/mmio.c
+++ b/apps/plugins/mikmod/mmio.c
@@ -159,7 +159,7 @@ static int _mm_FileReader_Seek(MREADER* reader,long offset,int whence)
//return fseek(((MFILEREADER*)reader)->file,
// (whence==SEEK_SET)?offset+reader->iobase:offset,whence);
return lseek(((MFILEREADER*)reader)->file,
- (whence==SEEK_SET)?offset+reader->iobase:offset,whence);
+ (whence==SEEK_SET)?offset+reader->iobase:offset,whence) >= 0 ? 0 : -1;
}
static long _mm_FileReader_Tell(MREADER* reader)