From 067e9de00a51f1e702595c42840b577f32c398d9 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 1 Dec 2018 14:23:27 +0100 Subject: [PATCH] - fixed: V_FindFontColor is not suitable for direct calls from JIT code, thanks to its FName parameter. --- src/scripting/vmthunks.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/scripting/vmthunks.cpp b/src/scripting/vmthunks.cpp index a7de8b2b9..83353ff52 100644 --- a/src/scripting/vmthunks.cpp +++ b/src/scripting/vmthunks.cpp @@ -1542,7 +1542,12 @@ DEFINE_ACTION_FUNCTION_NATIVE(FFont, StringWidth, StringWidth) ACTION_RETURN_INT(StringWidth(self, str)); } -DEFINE_ACTION_FUNCTION_NATIVE(FFont, FindFontColor, V_FindFontColor) +static int FindFontColor(int name) +{ + return V_FindFontColor(ENamedName(name)); +} + +DEFINE_ACTION_FUNCTION_NATIVE(FFont, FindFontColor, FindFontColor) { PARAM_PROLOGUE; PARAM_NAME(code);