From 682853da42fd342f19f74625b07dd581cb9c6c5a Mon Sep 17 00:00:00 2001 From: asvitkine <> Date: Fri, 20 Jun 2008 00:39:47 +0000 Subject: [PATCH] [patch from Kelvin Delbarre] Fix file corruption experienced when doing random-access file I/O to the external filesystem. The application-specified ioPosMode parameter must be masked off appropriately in extfs.cpp:fs_set_fpos(), as is done elsewhere in the file. --- BasiliskII/src/extfs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BasiliskII/src/extfs.cpp b/BasiliskII/src/extfs.cpp index 012692fa..f4abaaf8 100644 --- a/BasiliskII/src/extfs.cpp +++ b/BasiliskII/src/extfs.cpp @@ -1800,7 +1800,7 @@ static int16 fs_set_fpos(uint32 pb) return fnOpnErr; // Set file position - switch (ReadMacInt16(pb + ioPosMode)) { + switch (ReadMacInt16(pb + ioPosMode) & 3) { case fsFromStart: if (lseek(fd, ReadMacInt32(pb + ioPosOffset), SEEK_SET) < 0) return posErr;