diff options
author | Matthew Hoops | 2010-10-20 03:01:03 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-10-20 03:01:03 +0000 |
commit | 21a29d3b45183d0bd79f756d7e2fe90b9c372f65 (patch) | |
tree | d80877c3da7d4f3624cd72284b2071bc20545e7d /engines | |
parent | 59c054938a7fd2036badbecfbb3b72ad55b0e820 (diff) | |
download | scummvm-rg350-21a29d3b45183d0bd79f756d7e2fe90b9c372f65.tar.gz scummvm-rg350-21a29d3b45183d0bd79f756d7e2fe90b9c372f65.tar.bz2 scummvm-rg350-21a29d3b45183d0bd79f756d7e2fe90b9c372f65.zip |
SCUMM: Have o6_getRandomNumber() use the absolute value of the argument
The Backyard Baseball series calls the function with negative numbers, but expects a positive result. The games are now actually playable.
Thanks to Kirben for assistance in tracking this bug down.
svn-id: r53630
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/script_v6.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp index c5841dfaf4..ede32623aa 100644 --- a/engines/scumm/script_v6.cpp +++ b/engines/scumm/script_v6.cpp @@ -1285,7 +1285,7 @@ void ScummEngine_v6::o6_loadRoomWithEgo() { void ScummEngine_v6::o6_getRandomNumber() { int rnd; - rnd = _rnd.getRandomNumber(pop()); + rnd = _rnd.getRandomNumber(ABS(pop())); if (VAR_RANDOM_NR != 0xFF) VAR(VAR_RANDOM_NR) = rnd; push(rnd); |