[patch] viewer lockup due to recent signed->unsigned change
Leonard den Ottolander
leonard at den.ottolander.nl
Thu Aug 19 17:48:20 UTC 2004
Hi Jindrich,
On Thu, 2004-08-19 at 19:14, Jindrich Makovicka wrote:
> Leonard den Ottolander wrote:
> > - for (q = p = current - 1; p >= view->first; p--)
> > + for (q = p = current - 1; p > view->first; p--)
>
> This isn't equivalent, your modification misses the pass with
> p==view->first. That's why there is the test at the end of the loop, but
> before the decrement.
I guess you are correct, although it seems odd to use a for loop when
having a test at the end. Maybe it should be replaced with a do/while?
Leonard.
--
mount -t life -o ro /dev/dna /genetic/research
More information about the mc-devel
mailing list