aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2011-06-25 21:15:34 +0200
committerWillem Jan Palenstijn2011-06-25 21:16:12 +0200
commitbc4691a23e0ff1ff6f2452d7ad5d4cd612ad06a1 (patch)
tree57ad3d5c6c398dfebd61d8dc04c70f9b32fe621d /engines/sci/engine
parent4cbf30a88ca3cadb6f28a525f95578146d91037a (diff)
downloadscummvm-rg350-bc4691a23e0ff1ff6f2452d7ad5d4cd612ad06a1.tar.gz
scummvm-rg350-bc4691a23e0ff1ff6f2452d7ad5d4cd612ad06a1.tar.bz2
scummvm-rg350-bc4691a23e0ff1ff6f2452d7ad5d4cd612ad06a1.zip
SCI: Fix incorrect usage of sizeof
Thanks to salty-horse for the reports.
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/vm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index db682de16f..274b0bbbc9 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -462,7 +462,7 @@ int readPMachineInstruction(const byte *src, byte &extOpcode, int16 opparams[4])
extOpcode = src[offset++]; // Get "extended" opcode (lower bit has special meaning)
const byte opcode = extOpcode >> 1; // get the actual opcode
- memset(opparams, 0, sizeof(opparams));
+ memset(opparams, 0, 4*sizeof(int16));
for (int i = 0; g_opcode_formats[opcode][i]; ++i) {
//debugN("Opcode: 0x%x, Opnumber: 0x%x, temp: %d\n", opcode, opcode, temp);