From: Thomas Geymayer Date: Tue, 15 Oct 2013 12:21:45 +0000 (+0200) Subject: Nasal: use correct function pointer in naCall (with user data) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8ca8052a8d7653f28ac376b4d7dce5f85b903be4;p=simgear.git Nasal: use correct function pointer in naCall (with user data) --- diff --git a/simgear/nasal/code.c b/simgear/nasal/code.c index 395a3cdd..d1da92a3 100644 --- a/simgear/nasal/code.c +++ b/simgear/nasal/code.c @@ -874,8 +874,10 @@ naRef naCall(naContext ctx, naRef func, int argc, naRef* args, } if(IS_CCODE(PTR(func).func->code)) { - naCFunction fp = PTR(PTR(func).func->code).ccode->fptr; - result = (*fp)(ctx, obj, argc, args); + struct naCCode *ccode = PTR(PTR(func).func->code).ccode; + result = ccode->fptru + ? (*ccode->fptru)(ctx, obj, argc, args, ccode->user_data) + : (*ccode->fptr) (ctx, obj, argc, args); if(!ctx->callParent) naModUnlock(); return result; }