Hi,

On 2017-12-28 23:18:21 +0100 Wolfgang Lux <wolfgang....@gmail.com> wrote:



The problem is not so much the substringWithRange: method, but rather that the result of indexOfCharacter:, which is just NSNotFound, is not dealt with properly. This may be due to a 32/64 bit mismatch where the result of indexOfCharacter: is saved to an int variable before checking whether it is NSNotFound or perhaps the code incorrectly assumes that indexOfCharacter: returns -1 in case there is no match.

Assuming the current code, di you still see an issue?
i is unsigned integer and the enter condition of the if is i != NSNotFound

As you guessd, it was int before. I am tryint to change as many indices as possible to NSUInteger, so that when they get used to things like objectAtIndex or compare with a count, the types are uniform, while this fixed a couple of bugs for me, it needs quite some deeper change in many methods, like for cycles "counting down" or methods returning -1, where I think NSNotFound is more appropriate, NSRange.location does Since often these boundaries are mixed with NSRanges() I hope my changes will make everything more consistent. It is a lot of stuff and I "missed" many places, but I think in the past days I caught a lot and GNUMail is running again quite decently for me.

Riccardo


_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to