[patch] viewer lockup due to recent signed->unsigned change
Leonard den Ottolander
leonard at den.ottolander.nl
Thu Aug 19 16:49:55 UTC 2004
Hi Jindrich,
On Thu, 2004-08-19 at 18:24, Jindrich Makovicka wrote:
> --- view.c.orig 2004-08-17 17:51:30.000000000 +0200
> +++ view.c 2004-08-19 18:10:55.000000000 +0200
> @@ -1296,7 +1296,7 @@
> line = 1;
> else
> line = 0;
> - for (q = p = current - 1; p >= view->first; p--)
> + for (q = p = current - 1;; p--) {
> if (get_byte (view, p) == '\n' || p == view->first) {
> pm = p > view->first ? p + 1 : view->first;
> if (!view->wrap_mode) {
> @@ -1315,6 +1315,9 @@
> q = p + 1;
> }
> }
> + if (p <= view->first) break;
> + }
> +
> }
> return p > view->first ? p : view->first;
> }
I am not able to reproduce this, but I would say the last hunk is
unnecessary. No need to have a break statement at the end of the loop
when the for loop can do it's own comparision. All this seems to
indicate is:
- for (q = p = current - 1; p >= view->first; p--)
+ for (q = p = current - 1; p > view->first; p--)
Leonard.
--
mount -t life -o ro /dev/dna /genetic/research
More information about the mc-devel
mailing list