iphone - New NSString substringWithRange: Error Message -


i'm getting interesting new error ios 4:

-[nscfstring substringwithrange:]: invalid range {11, 4294967295}; become exception apps linked on snowleopard. warning shown once per app execution.

the error caused snippet of code got blog post helps title case string, , it's not going hard fix, haven't seen mentioned anywhere else, , i'm assuming apple wants people stop using magic 4294967295 number.

does know history / background of change?

edit: source title case code located at: http://vengefulcow.com/titlecase/ it's objective-c port (obviously). line 116 offender. it's problem under specific condition. i'm still tracking down.

unsigned 4294967295 same signed uint32_t value -1. i've seen problems 32 bit app archived -1 , 64 bit app unarchived big ass length (terribly fun when xcode calling malloc(4294967295) during 64-bit bring-up).

the cocoa frameworks detecting passed in range length longer string itself. warning now, truncated results, it'll hard error in future.

(in cases, nsnotfound can cause these kinds of issues).


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -