[Scummvm-git-logs] scummvm master -> eba3e39d9ba6a051cf28511e852b4f6d247f4a34

AndywinXp noreply at scummvm.org
Wed Apr 5 11:21:37 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
eba3e39d9b SCUMM: Fix RNG debug message for v5 and below games


Commit: eba3e39d9ba6a051cf28511e852b4f6d247f4a34
    https://github.com/scummvm/scummvm/commit/eba3e39d9ba6a051cf28511e852b4f6d247f4a34
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-04-05T13:21:21+02:00

Commit Message:
SCUMM: Fix RNG debug message for v5 and below games

Changed paths:
    engines/scumm/script_v5.cpp


diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 3b095e8248a..af2218003f6 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -1446,10 +1446,11 @@ void ScummEngine_v5::o5_getObjectState() {
 
 void ScummEngine_v5::o5_getRandomNr() {
 	getResultPos();
-	int rnd = _rnd.getRandomNumber(getVarOrDirectByte(PARAM_1));
+	int max = getVarOrDirectByte(PARAM_1);
+	int rnd = _rnd.getRandomNumber(max);
 	setResult(rnd);
 
-	debug(6, "o5_getRandomNr(): %d", rnd);
+	debug(6, "o5_getRandomNr(): %d (min: 0, max: %d)", rnd, max);
 }
 
 void ScummEngine_v5::o5_isScriptRunning() {




More information about the Scummvm-git-logs mailing list