aboutsummaryrefslogtreecommitdiff
path: root/engines/prince/script.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/prince/script.cpp')
-rw-r--r--engines/prince/script.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/prince/script.cpp b/engines/prince/script.cpp
index 0e9dd27877..d1a0034940 100644
--- a/engines/prince/script.cpp
+++ b/engines/prince/script.cpp
@@ -391,10 +391,10 @@ bool Script::loadAllMasks(Common::Array<Mask> &maskList, int offset) {
debug("Can't load %s", msStreamName.c_str());
delete msStream;
} else {
- uint32 dataSize = msStream->size();
+ int32 dataSize = msStream->size();
if (dataSize != -1) {
tempMask._data = (byte *)malloc(dataSize);
- if (msStream->read(tempMask._data, dataSize) != dataSize) {
+ if (msStream->read(tempMask._data, dataSize) != (uint32)dataSize) {
free(tempMask._data);
delete msStream;
return false;
@@ -477,7 +477,7 @@ uint32 Interpreter::step(uint32 opcodePC) {
// Get the current opcode
_lastOpcode = readScript16();
- if (_lastOpcode > kNumOpcodes)
+ if (_lastOpcode >= kNumOpcodes)
error(
"Trying to execute unknown opcode @0x%04X: %02d",
_currentInstruction,