From e4e86dd4f87aae4c397ea2bb018122443220fa35 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 5 Dec 2018 18:41:19 +0100 Subject: [PATCH] - fixed: Direct native functions for the JIT compiler may not return bool. A bool will only set the al register on x64, but the entire eax needs to be set for the JIT code to deal with it. --- src/scripting/vmiterators.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripting/vmiterators.cpp b/src/scripting/vmiterators.cpp index 172ba5d22..65d359c32 100644 --- a/src/scripting/vmiterators.cpp +++ b/src/scripting/vmiterators.cpp @@ -149,7 +149,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DBlockLinesIterator, CreateFromPos, CreateBLIFromP ACTION_RETURN_OBJECT(Create(x, y, z, h, radius, sec)); } -static bool BLINext(DBlockLinesIterator *self) +static int BLINext(DBlockLinesIterator *self) { return self->Next(&self->cres); } @@ -226,7 +226,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DBlockThingsIterator, CreateFromPos, CreateBTIFrom ACTION_RETURN_OBJECT(Create(x, y, z, h, radius, ignore, nullptr)); } -static bool NextBTI(DBlockThingsIterator *bti) +static int NextBTI(DBlockThingsIterator *bti) { return bti->iterator.Next(&bti->cres); }