diff options
author | Max Horn | 2003-05-10 22:35:12 +0000 |
---|---|---|
committer | Max Horn | 2003-05-10 22:35:12 +0000 |
commit | 5be0ce7adc9952ff065c7ec04cab4b87eb7b0e28 (patch) | |
tree | eb14397b4e391d1c3c4e4c799b70fa438da34bb1 /scumm/script_v6.cpp | |
parent | f412952667e36a023b239b8ee62994635ca375a5 (diff) | |
download | scummvm-rg350-5be0ce7adc9952ff065c7ec04cab4b87eb7b0e28.tar.gz scummvm-rg350-5be0ce7adc9952ff065c7ec04cab4b87eb7b0e28.tar.bz2 scummvm-rg350-5be0ce7adc9952ff065c7ec04cab4b87eb7b0e28.zip |
work around some illegal var access' in COMI/V8 - there are more, but I am not always sure if avoiding the access is the proper fix; maybe in some cases we should just define that var for V8 to the proper value?
svn-id: r7425
Diffstat (limited to 'scumm/script_v6.cpp')
-rw-r--r-- | scumm/script_v6.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index 16f04701dd..7b69a6578c 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -1155,7 +1155,8 @@ void Scumm_v6::o6_loadRoomWithEgo() { void Scumm_v6::o6_getRandomNumber() { int rnd; rnd = _rnd.getRandomNumber(pop()); - VAR(VAR_V6_RANDOM_NR) = rnd; + if (VAR_V6_RANDOM_NR != 0xFF) + VAR(VAR_V6_RANDOM_NR) = rnd; push(rnd); } @@ -1163,7 +1164,8 @@ void Scumm_v6::o6_getRandomNumberRange() { int max = pop(); int min = pop(); int rnd = _rnd.getRandomNumberRng(min, max); - VAR(VAR_V6_RANDOM_NR) = rnd; + if (VAR_V6_RANDOM_NR != 0xFF) + VAR(VAR_V6_RANDOM_NR) = rnd; push(rnd); } |