Hi...
I assume a bug in NSString.m method:
- (void) getLineStart: (unsigned *)startIndex end: (unsigned
*)lineEndIndex contentsEnd: (unsigned *)contentsEndIndex forRange:
(NSRange)aRange
When you read the code carefully you will find this (about line 1852 in
gnustep-base-1.1.0):
...
if (lineEndIndex)
{
if (end < len
&& ((*caiImp)(self, caiSel, end) == (unichar)0x000D)
&& ((*caiImp)(self, caiSel, end+1) == (unichar)0x000A))
{
*lineEndIndex = end+1;
}
else
{
*lineEndIndex = end;
}
}
...
When one will assume that end and len are just one number away
(eg end==101 and len==102 ) - what can happen when you read the whole
method - the
((*caiImp)(self, caiSel, end+1) == (unichar)0x000A) in the second if()
statement
will fail with a Rangeexception in GSStrings characterAtIndex_c()
because you read
one letter out of range...
If this is true maybe this should be fixed...
Roland
PS: This is my first posting to this list I hope I am right here...