bug-gnustep
[Top][All Lists]
Advanced

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

Re: Fix: GSTextStorage, setAttributes:range:


From: Richard Frith-Macdonald
Subject: Re: Fix: GSTextStorage, setAttributes:range:
Date: Mon, 18 Dec 2000 16:54:16 +0000

On Monday, December 18, 2000, at 03:34 PM, Georg Fleischmann wrote:

> Hi Richard, 
>  
> > Hmm ... I'm not convinced. 
> > 1. As far as I can see, it should be impossible for info-loc to be greater 
> > than beginRangeLoc and for arrayIndex to be zero - so the change would have 
> > no effect. (of course, I could have missed something here). 
>  
> Ok, in the case I'm looking into, beginRangeLoc is 1 and thus already greater 
>   
> than info-loc (0). 
> I take it, that it isn't legal that the method is called with a 
> range.location   
> > loc (of the only attribute)? This is what happens. 

Rather, it isn't legal for the method to be called with a range.location less
than that of the only attribute (ie the first attribute must have a location
of zero).

> Here is the situation at the beginning of the method: 
> range.location = 1 
> [textChars length] = 2 
> infoArray contains only one attribute with  loc = 0 

So at line 622 ....
beginRangeLoc == 1
info->loc == 0
and the test 'info->loc >= beginRangeLoc' will be false.

> If this is illegal, I would continue my search where the method is called. 

I did notice a bug though - if the attributes you are setting are the same
as those already in effect, the code would reset info->location when it should
have been leaving it alone.  I committed a fix for this - perhaps it cures 
whatever
problems you are having?


reply via email to

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