aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/nebular/dialogs_nebular.cpp
diff options
context:
space:
mode:
authorStrangerke2014-03-22 22:02:52 +0100
committerStrangerke2014-03-22 22:02:52 +0100
commitc42e831817d3eef04f493c08cd288dfe41f764e6 (patch)
treef71cb1857708f23b250a1bc98e4a876d603607de /engines/mads/nebular/dialogs_nebular.cpp
parenteb82e63398c2050cbb72008cd849b8d1fda89c3e (diff)
downloadscummvm-rg350-c42e831817d3eef04f493c08cd288dfe41f764e6.tar.gz
scummvm-rg350-c42e831817d3eef04f493c08cd288dfe41f764e6.tar.bz2
scummvm-rg350-c42e831817d3eef04f493c08cd288dfe41f764e6.zip
MADS: Introduce another getRandomNumber function with 2 parameters
Diffstat (limited to 'engines/mads/nebular/dialogs_nebular.cpp')
-rw-r--r--engines/mads/nebular/dialogs_nebular.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp
index dc74f39fe8..6dabbec1b9 100644
--- a/engines/mads/nebular/dialogs_nebular.cpp
+++ b/engines/mads/nebular/dialogs_nebular.cpp
@@ -90,7 +90,7 @@ bool CopyProtectionDialog::getHogAnusEntry(HOGANUS &entry) {
// Read in the total number of entries, and randomly pick an entry to use
int numEntries = f.readUint16LE();
- int entryIndex = _vm->getRandomNumber(numEntries - 2) + 1;
+ int entryIndex = _vm->getRandomNumber(1, numEntries);
// Read in the encrypted entry
f.seek(28 * entryIndex + 2);