Browse Source

fix wrong continue in double stacked for loop

Jan Klemkow 5 years ago
parent
commit
005d957522
1 changed files with 2 additions and 1 deletions
  1. 2 1
      scroll.c

+ 2 - 1
scroll.c

@@ -419,7 +419,7 @@ main(int argc, char *argv[])
 						scrollup(rules[i].lines);
 					if (rules[i].event == SCROLL_DOWN)
 						scrolldown(buf, pos, rules[i].lines);
-					continue;
+					goto out;
 				}
 			}
  noevent:
@@ -429,6 +429,7 @@ main(int argc, char *argv[])
 			if (bottom != TAILQ_FIRST(&head))
 				jumpdown(buf, pos);
 		}
+ out:
 		if (pfd[1].revents & POLLIN) {
 			ssize_t n = read(mfd, input, sizeof input);