aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2008-08-25 14:55:11 +0000
committerFilippos Karapetis2008-08-25 14:55:11 +0000
commita3404665f6a303a93afb9af43505d6c8790581cf (patch)
tree41b1ec95313864326cf5c8ce20e555a529532737 /engines
parent3b90f69a6e30b4e815d450d4165911a78a1357b9 (diff)
downloadscummvm-rg350-a3404665f6a303a93afb9af43505d6c8790581cf.tar.gz
scummvm-rg350-a3404665f6a303a93afb9af43505d6c8790581cf.tar.bz2
scummvm-rg350-a3404665f6a303a93afb9af43505d6c8790581cf.zip
Fix for bug #2073159 - "MICKEY: Incomplete computer message".
Random numbers are calculated from 1 onwards in the preAGI engines, but there was an off-by one error. I'm currently hesitant to add this fix to the 0.12.0 branch, as I'm unsure if it has any possible regressions in Troll's Tale or Winnie the Pooh svn-id: r34152
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/preagi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/agi/preagi.h b/engines/agi/preagi.h
index 500f98546b..d95035a073 100644
--- a/engines/agi/preagi.h
+++ b/engines/agi/preagi.h
@@ -73,7 +73,7 @@ public:
// Keyboard
int getSelection(SelectionTypes type);
- int rnd(int hi) { return (_rnd->getRandomNumber(hi) + 1); }
+ int rnd(int hi) { return (_rnd->getRandomNumber(hi - 1) + 1); }
// Text
void drawStr(int row, int col, int attr, const char *buffer);