FetchNaturalChunk() needs to use isspace() just as NaturalCompare does
when retrieving number chunks. Otherwise we wind up with an infinite loop if a number chunk is preceded by another whitespace char such as \t. Fixes a hang observed on Clemens' mail store. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39011 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
22e3bbdf9b
commit
567ffaecb9
@ -212,9 +212,9 @@ FetchNaturalChunk(natural_chunk& chunk, const char* source)
|
||||
return pos;
|
||||
}
|
||||
|
||||
// skip leading zeros and spaces
|
||||
// skip leading zeros and whitespace characters
|
||||
int32 skip = 0;
|
||||
while (source[0] == '0' || source[0] == ' ') {
|
||||
while (source[0] == '0' || isspace(source[0])) {
|
||||
source++;
|
||||
skip++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user