Hi,
Wolfgang Lux wrote:
Okay, upon a second inspection the original termination condition i < _length +
1 may be right, but in that case the assignment endType = codeType(_uchar+end) is
wrong. In fact, you do not need this assignment and the local variable endType at
all. Instead the condition in the if statement should be corrected. Change
if ((startType != endType) || (end == _length))
into
if (end == _length || startType != codeType(_uchar+end))
so that the array access is made only within the bounds of the buffer.
Yes, that it perfect and it works. I was looking for about the same fix,
but with a double nested if. However since endType isn't used in the
code below, you solution is just more compact!
Riccardo
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep