From: Jay Freeman (saurik) Date: Sat, 10 Oct 2009 12:46:56 +0000 (+0000) Subject: Minor refactoring, checkpoint commit. X-Git-Tag: v0.9.432~364 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/e0dc20ec507bb66f77da27c196c62d16b5e417c7 Minor refactoring, checkpoint commit. --- diff --git a/Library.mm b/Library.mm index fc4bd5b..e43194f 100644 --- a/Library.mm +++ b/Library.mm @@ -1358,13 +1358,17 @@ bool Index_(apr_pool_t *pool, Struct_privateData *internal, JSStringRef property const char *name(CYPoolCString(pool, property, &length)); double number(CYCastDouble(name, length)); - if (std::isnan(number)) - // XXX: implement! - return false; + if (std::isnan(number)) { + if (property == NULL) + return false; - index = static_cast(number); - if (index != number || index < 0 || static_cast(index) >= typical->type_.data.signature.count) + // XXX: implement! return false; + } else { + index = static_cast(number); + if (index != number || index < 0 || static_cast(index) >= typical->type_.data.signature.count) + return false; + } base = reinterpret_cast(internal->value_); for (ssize_t local(0); local != index; ++local) diff --git a/todo.txt b/todo.txt index 53ef7bf..7691577 100644 --- a/todo.txt +++ b/todo.txt @@ -3,3 +3,4 @@ blocks and empty statements are poorly factored property labels should get minimized functors use both ffiData and ffoData... rename "data" variables to "internal" +unicode identifier support (native and \u)