[Scummvm-git-logs] scummvm master -> ca6bf735759ef3739fbdae5ace43dffce4c193ba
sev-
noreply at scummvm.org
Tue Jun 9 12:18:39 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
ca6bf73575 DIRECTOR: Prevent stack overflow introduced in the last commit
Commit: ca6bf735759ef3739fbdae5ace43dffce4c193ba
https://github.com/scummvm/scummvm/commit/ca6bf735759ef3739fbdae5ace43dffce4c193ba
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-06-09T14:18:03+02:00
Commit Message:
DIRECTOR: Prevent stack overflow introduced in the last commit
Changed paths:
engines/director/util.cpp
engines/director/util.h
diff --git a/engines/director/util.cpp b/engines/director/util.cpp
index 0d42c361f1f..c65c3ee66c7 100644
--- a/engines/director/util.cpp
+++ b/engines/director/util.cpp
@@ -1203,8 +1203,9 @@ Common::Path dumpFactoryName(const char *prefix, const char *name, const char *e
return Common::Path(Common::String::format("./dumps/%s-factory-%s.%s", prefix, name, ext), '/');
}
-void RandomState::setSeed(int seed) {
- init(32);
+void RandomState::setSeed(int seed, bool runInit) {
+ if (runInit)
+ init(32);
// If we a GUI override, use that instead of the provided seed
if (ConfMan.hasKey("random_seed")) {
@@ -1246,7 +1247,7 @@ void RandomState::init(int len) {
// The original is _always_ initalized with a seed of 1. It is hardcoded and is by design
// The developers were offered to use `set the randomSeed` Lingo
- setSeed(1);
+ setSeed(1, false);
_mask = masks[len - 2];
}
diff --git a/engines/director/util.h b/engines/director/util.h
index 1bbf9e44f55..8d5e746c6e9 100644
--- a/engines/director/util.h
+++ b/engines/director/util.h
@@ -81,7 +81,7 @@ public:
_seed = _mask = _len = 0;
}
- void setSeed(int seed);
+ void setSeed(int seed, bool runInit = true);
uint32 getSeed() { return _seed; }
int32 getRandom(int32 range);
More information about the Scummvm-git-logs
mailing list