From 26eac560dd51003717bcf0ed5cf695028af0d654 Mon Sep 17 00:00:00 2001 From: Kevin Caccamo Date: Fri, 15 Jan 2021 12:30:44 -0500 Subject: [PATCH] Fix ScriptCall missing default arguments 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. --- src/playsim/p_acs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/playsim/p_acs.cpp b/src/playsim/p_acs.cpp index 7a8516eee..e2bdf3b85 100644 --- a/src/playsim/p_acs.cpp +++ b/src/playsim/p_acs.cpp @@ -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, ¶ms[0], params.Size(), &ret, 1); + VMCallWithDefaults(func, params, &ret, 1); if (rettype == TypeName) { retval = GlobalACSStrings.AddString(FName(ENamedName(retval)).GetChars());