From 5984bc913c2e7172945e0d9209b4aa1f049a86fa Mon Sep 17 00:00:00 2001 From: babydance Date: Sun, 1 Feb 2015 22:39:17 +0800 Subject: [PATCH] fix the bug : when the data is too long it will throw exception : out of bounds; string length 60. This will become an exception for apps linked after 10.10 and iOS 8. Warning shown once per app execution. --- RTLabelProject/Classes/RTLabel.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RTLabelProject/Classes/RTLabel.m b/RTLabelProject/Classes/RTLabel.m index 4cf8624..0a953be 100755 --- a/RTLabelProject/Classes/RTLabel.m +++ b/RTLabelProject/Classes/RTLabel.m @@ -873,7 +873,7 @@ + (RTLabelExtractedComponent*)extractTextStyleFromText:(NSString*)data paragraph [scanner scanUpToString:@">" intoString:&text]; NSString *delimiter = [NSString stringWithFormat:@"%@>", text]; - int position = [data rangeOfString:delimiter].location; + long position = [data rangeOfString:delimiter].location; if (position!=NSNotFound) { if ([delimiter rangeOfString:@"