From 77f56624a75e39b19c72e6076e46e230ce3abbb1 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Thu, 13 Sep 2012 01:52:14 -0700 Subject: [PATCH] Fix @bool .valueOf() to return boolean, not number. --- ObjectiveC/Library.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ObjectiveC/Library.mm b/ObjectiveC/Library.mm index 1749d88..a113779 100644 --- a/ObjectiveC/Library.mm +++ b/ObjectiveC/Library.mm @@ -959,7 +959,7 @@ NSObject *CYCopyNSObject(apr_pool_t *pool, JSContextRef context, JSValueRef valu } - (JSValueRef) cy$valueOfInContext:(JSContextRef)context { CYObjectiveTry_(context) { - return [self cy$JSType] != kJSTypeBoolean ? CYCastJSValue(context, [self doubleValue]) : CYCastJSValue(context, [self boolValue]); + return [self cy$JSType] != kJSTypeBoolean ? CYCastJSValue(context, [self doubleValue]) : CYCastJSValue(context, static_cast([self boolValue])); } CYObjectiveCatch } @end -- 2.47.2