mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-02-04 14:33:47 +00:00
[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.
This commit is contained in:
parent
1002714623
commit
682853da42
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user