about summary refs log tree commit diff
path: root/Src/loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/loop.c')
-rw-r--r--Src/loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/loop.c b/Src/loop.c
index b81ce29aa..0d7379c00 100644
--- a/Src/loop.c
+++ b/Src/loop.c
@@ -357,7 +357,7 @@ execrepeat(Cmd cmd, LinkList args, int flags)
     pushheap();
     cmdpush(CS_REPEAT);
     loops++;
-    while (count--) {
+    while (count-- > 0) {
 	execlist(cmd->u.list, 1, 0);
 	freeheap();
 	if (breaks) {