You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
unsigned long position = [data rangeOfString:delimiter].location; // Here the problem because miss precision because position is declared like int
if (position!=NSNotFound)
{
if ([delimiter rangeOfString:@"<p"].location==0)
{
data = [data stringByReplacingOccurrencesOfString:delimiter withString:paragraphReplacement options:NSCaseInsensitiveSearch range:NSMakeRange(last_position, position+delimiter.length-last_position)];
}
else
{
data = [data stringByReplacingOccurrencesOfString:delimiter withString:@"" options:NSCaseInsensitiveSearch range:NSMakeRange(last_position, position+delimiter.length-last_position)];
}
data = [data stringByReplacingOccurrencesOfString:@"<" withString:@"<"];
data = [data stringByReplacingOccurrencesOfString:@">" withString:@">"];
}
我遇到这个问题,i find the reason lies on RTLabel.m—— line 848~858:
if (position!=NSNotFound)
{
if ([delimiter rangeOfString:@"<p"].location==0)
{
data = [data stringByReplacingOccurrencesOfString:delimiter withString:paragraphReplacement options:NSCaseInsensitiveSearch range:NSMakeRange(last_position, position+delimiter.length-last_position)];
}
else
{
data = [data stringByReplacingOccurrencesOfString:delimiter withString:@"" options:NSCaseInsensitiveSearch range:NSMakeRange(last_position, position+delimiter.length-last_position)];
}
How can i resolve it?THANKS!
The text was updated successfully, but these errors were encountered: