[Scummvm-git-logs] scummvm master -> 9433836fc14b8cbdc2e8ff3fde8724cf13843fc2
sev-
noreply at scummvm.org
Fri Aug 25 23:25:20 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:
9433836fc1 DIRECTOR: handle void argument to soundBusy
Commit: 9433836fc14b8cbdc2e8ff3fde8724cf13843fc2
https://github.com/scummvm/scummvm/commit/9433836fc14b8cbdc2e8ff3fde8724cf13843fc2
Author: Misty De Meo (mistydemeo at gmail.com)
Date: 2023-08-26T01:25:17+02:00
Commit Message:
DIRECTOR: handle void argument to soundBusy
Horror Tour 2 occasionally calls this with one void argument. It looks
like a bug in the original game, but one that original Director doesn't
crash on.
Changed paths:
engines/director/lingo/lingo-builtins.cpp
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index e4a2782bb3d..d2b18a85f6c 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -3095,9 +3095,14 @@ void LB::b_soundBusy(int nargs) {
DirectorSound *sound = g_director->getCurrentWindow()->getSoundManager();
Datum whichChannel = g_lingo->pop();
- TYPECHECK(whichChannel, INT);
+ // Horror Tour 2 calls this with a void argument
+ TYPECHECK2(whichChannel, INT, VOID);
+ int channel = whichChannel.u.i;
+ if (whichChannel.type == VOID) {
+ channel = 1;
+ }
- bool isBusy = sound->isChannelActive(whichChannel.u.i);
+ bool isBusy = sound->isChannelActive(channel);
Datum result;
result.type = INT;
result.u.i = isBusy ? 1 : 0;
More information about the Scummvm-git-logs
mailing list