Re: Fix, NSLayoutManager

2004-03-21 Thread Alexander Malmberg
Georg Fleischmann wrote: > Well, it doesn't work. Thinko on my part. The range 'r' has post-change indices, so I need to adjust before comparing. > That's all I can say, as I have not much knowledge of the internals here. > Here are the involved variables of the method for my test case: > > layo

Re: Fix, NSLayoutManager

2004-03-15 Thread Georg Fleischmann
Alexander Malmberg wrote: > However, in the original patch, the wrap-around is just ugly; it isn't > really a problem since the wrap-around behavior of unsigned ints is > defined by the c standard. It may not please the educated eye, but it works :-) Also, the patch doesn't need a cast which woul

Re: Fix, NSLayoutManager

2004-03-13 Thread Georg Fleischmann
Hi Fred, > I think you did spot a real problem here, but your solution just doesn't > look right. An unsigned number never should be allowed to wrap around. > What about a check like this: With casts like this it works: if (layout_char > r.location) { if ((int)layout_char +

Re: Fix, NSLayoutManager

2004-03-13 Thread Alexander Malmberg
Fred Kiefer wrote: > Georg Fleischmann wrote: > > Hi, > > > > here is a little patch for the NSLayoutManager fixing a problem with > > layout_char. layout_char is unsigned but may become "negative", thus flipping > > over to huge positive. The huge positive value then is not sattisfying the '<' > >

Re: Fix, NSLayoutManager

2004-03-12 Thread Fred Kiefer
Georg Fleischmann wrote: Hi, here is a little patch for the NSLayoutManager fixing a problem with layout_char. layout_char is unsigned but may become "negative", thus flipping over to huge positive. The huge positive value then is not sattisfying the '<' comparison. Georg 2004-03-10 Georg

Fix, NSLayoutManager

2004-03-11 Thread Georg Fleischmann
Hi, here is a little patch for the NSLayoutManager fixing a problem with layout_char. layout_char is unsigned but may become "negative", thus flipping over to huge positive. The huge positive value then is not sattisfying the '<' comparison. Georg 2004-03-10 Georg Fleischmann * g