From 701ffb868b45ddf7fe21acb0f9af9237b201f5ec Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 8 Nov 2016 22:36:44 +0100 Subject: [PATCH] - fixed: The first argument of string-based ACS specials was missing a string to name cast. --- src/scripting/codegeneration/codegen.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/scripting/codegeneration/codegen.cpp b/src/scripting/codegeneration/codegen.cpp index 32ee2d012..63302d600 100644 --- a/src/scripting/codegeneration/codegen.cpp +++ b/src/scripting/codegeneration/codegen.cpp @@ -6409,7 +6409,16 @@ FxExpression *FxActionSpecialCall::Resolve(FCompileContext& ctx) } else if (Special < 0 && i == 0) { - if ((*ArgList)[i]->ValueType != TypeName) + if ((*ArgList)[i]->ValueType == TypeString) + { + (*ArgList)[i] = new FxNameCast((*ArgList)[i]); + (*ArgList)[i] = (*ArgList)[i]->Resolve(ctx); + if ((*ArgList)[i] == nullptr) + { + failed = true; + } + } + else if ((*ArgList)[i]->ValueType != TypeName) { ScriptPosition.Message(MSG_ERROR, "Name expected for parameter %d", i); failed = true;