From 639664e5c1b60087d09b046a81f624a55a01af72 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 20 Dec 2015 02:12:35 -0800 Subject: [PATCH] Do not allow loss of precision due to double cast. --- Execute.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Execute.cpp b/Execute.cpp index 340a7fa..2e02b28 100644 --- a/Execute.cpp +++ b/Execute.cpp @@ -297,6 +297,7 @@ JSValueRef CYCastJSValue(JSContextRef context, double value) { #define CYCastJSValue_(Type_) \ JSValueRef CYCastJSValue(JSContextRef context, Type_ value) { \ + _assert(static_cast(static_cast(value)) == value); \ return JSValueMakeNumber(context, static_cast(value)); \ } -- 2.47.2