Skip to content

Instantly share code, notes, and snippets.

@probablycorey
Created June 16, 2011 16:25
Show Gist options
  • Save probablycorey/1029624 to your computer and use it in GitHub Desktop.
Save probablycorey/1029624 to your computer and use it in GitHub Desktop.
diff --git a/lib/wax_helpers.m b/lib/wax_helpers.m
index dee91a9..f0c351d 100644
--- a/lib/wax_helpers.m
+++ b/lib/wax_helpers.m
@@ -219,7 +219,7 @@ void wax_fromInstance(lua_State *L, id instance) {
if ([instance isKindOfClass:[NSString class]]) {
lua_pushstring(L, [(NSString *)instance UTF8String]);
}
- else if ([instance isKindOfClass:[NSNumber class]]) {
+ else if ([instance isKindOfClass:[NSNumber class]] && ![instance isKindOfClass:[NSDecimalNumber class]]) lua_pushnumber(L, [instance doubleValue]);
}
else if ([instance isKindOfClass:[NSArray class]]) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment