diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp index f8ed2965dfa..79290d53f01 100644 --- a/scumm/script_v6he.cpp +++ b/scumm/script_v6he.cpp @@ -1031,6 +1031,10 @@ void ScummEngine_v6he::o6_readFile() { int32 size = pop(); int slot = pop(); + // Fatty Bear uses positive values + if (_gameId == GID_FBEAR) + size = -size; + if (size == -2) { push(_hFileTable[slot].readUint16LE()); } else if (size == -1) { @@ -1053,6 +1057,10 @@ void ScummEngine_v6he::o6_writeFile() { int16 resID = pop(); int slot = pop(); + // Fatty Bear uses positive values + if (_gameId == GID_FBEAR) + size = -size; + if (size == -2) { _hFileTable[slot].writeUint16LE(resID); } else if (size == -1) {