From bea1697baa7266e75831e388d568cb8a979bdeee Mon Sep 17 00:00:00 2001 From: Wietse Wind Date: Thu, 30 May 2024 12:06:15 +0200 Subject: [PATCH] Fix JS float_int return JS instead of JSXFL --- src/ripple/app/hook/impl/applyHook.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ripple/app/hook/impl/applyHook.cpp b/src/ripple/app/hook/impl/applyHook.cpp index 145d5f090..4db37246e 100644 --- a/src/ripple/app/hook/impl/applyHook.cpp +++ b/src/ripple/app/hook/impl/applyHook.cpp @@ -7404,7 +7404,9 @@ DEFINE_JS_FUNCTION( !fits_u32(dp, ab)) returnJS(INVALID_ARGUMENT); - returnJSXFL(__float_int(hookCtx, applyCtx, j, *f1, (uint32_t)(*dp), (uint32_t)(*ab))); + // Note! This is the only (?) place where a float/... method has to return `returnJS` instead + // of `returnJSXFL` as this is where we cast to JS usable Number + returnJS(__float_int(hookCtx, applyCtx, j, *f1, (uint32_t)(*dp), (uint32_t)(*ab))); JS_HOOK_TEARDOWN(); }