From 3fb3831843abdc50bc42cca89b982f2d18d59fc3 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 4 Dec 2018 19:14:14 +0100 Subject: [PATCH] - fixed: SBar_SetClipRect had a superfluous argument resulting in incorrect behavior --- src/scripting/vm/vm.h | 8 ++++++++ src/scripting/vmthunks.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/scripting/vm/vm.h b/src/scripting/vm/vm.h index 4f6b23bc5..202fba2d1 100644 --- a/src/scripting/vm/vm.h +++ b/src/scripting/vm/vm.h @@ -637,6 +637,14 @@ struct AFuncDesc MSVC_ASEG AFuncDesc const *const cls##_##name##_HookPtr GCC_ASEG = &cls##_##name##_Hook; \ static int AF_##cls##_##name(VM_ARGS) +#define DEFINE_ACTION_FUNCTION_NATIVE0(cls, name, native) \ + static int AF_##cls##_##name(VM_ARGS); \ + VMNativeFunction *cls##_##name##_VMPtr; \ + static const AFuncDesc cls##_##name##_Hook = { #cls, #name, AF_##cls##_##name, &cls##_##name##_VMPtr, {} }; \ + extern AFuncDesc const *const cls##_##name##_HookPtr; \ + MSVC_ASEG AFuncDesc const *const cls##_##name##_HookPtr GCC_ASEG = &cls##_##name##_Hook; \ + static int AF_##cls##_##name(VM_ARGS) + #define DEFINE_ACTION_FUNCTION(cls, name) \ static int AF_##cls##_##name(VM_ARGS); \ VMNativeFunction *cls##_##name##_VMPtr; \ diff --git a/src/scripting/vmthunks.cpp b/src/scripting/vmthunks.cpp index 7b94b3de4..17ae5f9ee 100644 --- a/src/scripting/vmthunks.cpp +++ b/src/scripting/vmthunks.cpp @@ -2285,7 +2285,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DBaseStatusBar, Fill, SBar_Fill) return 0; } -static void SBar_SetClipRect(DBaseStatusBar *self, int color, double x, double y, double w, double h, int flags) +static void SBar_SetClipRect(DBaseStatusBar *self, double x, double y, double w, double h, int flags) { self->SetClipRect(x, y, w, h, flags); }