Bugfix: Avoid looping while parsing the children of a tree

Happens very intermittently, readLine keeps returning "\r".
This commit is contained in:
Nathan Kinsinger
2010-03-30 12:59:34 -07:00
committed by Dave Grijalva
parent 5ea536be97
commit 6e06e4b931
+2
View File
@@ -216,6 +216,8 @@
NSString* p = [handle readLine];
while (p.length > 0) {
if ([p isEqualToString:@"\r"])
break;
BOOL isLeaf = ([p characterAtIndex:p.length - 1] != '/');
if (!isLeaf)
p = [p substringToIndex:p.length -1];