discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gorm can edit which types of files ?


From: Riccardo Mottola
Subject: Re: Gorm can edit which types of files ?
Date: Fri, 29 Dec 2017 00:03:44 +0100
User-agent: GNUMail (Version 1.2.3)

Hi,

On 2017-12-28 23:18:21 +0100 Wolfgang Lux <wolfgang.lux@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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]