diff options
author | Colin Snover | 2017-09-08 20:01:43 -0500 |
---|---|---|
committer | Colin Snover | 2017-09-08 21:10:51 -0500 |
commit | 5228aa29fa632249c835f98fbc4cfc01fa5f222b (patch) | |
tree | 8070e9fe76ec65be4b876d53eae42a02a0f21396 | |
parent | 7a1b35212bf44736104dc202d1f23e71bfdc4cc6 (diff) | |
download | scummvm-rg350-5228aa29fa632249c835f98fbc4cfc01fa5f222b.tar.gz scummvm-rg350-5228aa29fa632249c835f98fbc4cfc01fa5f222b.tar.bz2 scummvm-rg350-5228aa29fa632249c835f98fbc4cfc01fa5f222b.zip |
SCI32: Fix crash when changing security level of dead people in Phant2
In the original interpreter, is it valid to pass a null reference
to both kArray(GetData) (it just acts as an identity function when
the passed argument is not an object) and to kString functions (it
always dereferences to an empty string).
Fixes Trac#10039.
-rw-r--r-- | engines/sci/engine/kernel_tables.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index ac932199d3..f4f96ad253 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -521,7 +521,7 @@ static const SciKernelMapSubEntry kArray_subops[] = { { SIG_SCI32, 6, MAP_CALL(ArrayCopy), "ririi", NULL }, // there is no subop 7 { SIG_SCI32, 8, MAP_CALL(ArrayDuplicate), "r", NULL }, - { SIG_SCI32, 9, MAP_CALL(ArrayGetData), "[or]", NULL }, + { SIG_SCI32, 9, MAP_CALL(ArrayGetData), "[0or]", NULL }, { SIG_SCI3, 10, MAP_CALL(ArrayByteCopy), "ririi", NULL }, SCI_SUBOPENTRY_TERMINATOR }; @@ -553,8 +553,8 @@ static const SciKernelMapSubEntry kString_subops[] = { { SIG_THRU_SCI21MID, 18, MAP_CALL(StringReplaceSubstringEx), "rrrr", NULL }, { SIG_SINCE_SCI21LATE, 8, MAP_CALL(StringLength), "r", NULL }, - { SIG_SINCE_SCI21LATE, 9, MAP_CALL(StringFormat), "[ro](.*)", NULL }, - { SIG_SINCE_SCI21LATE,10, MAP_CALL(StringFormatAt), "r[ro](.*)", NULL }, + { SIG_SINCE_SCI21LATE, 9, MAP_CALL(StringFormat), "[0ro](.*)", NULL }, + { SIG_SINCE_SCI21LATE,10, MAP_CALL(StringFormatAt), "r[0ro](.*)", NULL }, { SIG_SINCE_SCI21LATE,11, MAP_CALL(StringToInteger), "r", NULL }, { SIG_SINCE_SCI21LATE,12, MAP_CALL(StringTrim), "ri(i)", NULL }, { SIG_SINCE_SCI21LATE,13, MAP_CALL(StringToUpperCase), "r", NULL }, |