Skip to content

Commit

Permalink
Fix ScriptCall missing default arguments
Browse files Browse the repository at this point in the history
There was one VMCall in DLevelScript::ScriptCall that didn't use default arguments. This was causing assertion failures in the GZDoom debug build when trying to run Wolfenstein: Blade of Agony on any map that wasn't TITLEMAP, because ACSTools.FindInventoryClass returns a boolean, and it has a default argument.
  • Loading branch information
Talon1024 authored and coelckers committed Jan 16, 2021
1 parent 44b4359 commit 26eac56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/playsim/p_acs.cpp
Expand Up @@ -5261,7 +5261,7 @@ int DLevelScript::SwapActorTeleFog(AActor *activator, int tid)
if (rettype == TypeSInt32 || rettype == TypeBool || rettype == TypeColor || rettype == TypeName || rettype == TypeSound)
{
VMReturn ret(&retval);
VMCall(func, &params[0], params.Size(), &ret, 1);
VMCallWithDefaults(func, params, &ret, 1);
if (rettype == TypeName)
{
retval = GlobalACSStrings.AddString(FName(ENamedName(retval)).GetChars());
Expand Down

0 comments on commit 26eac56

Please sign in to comment.