summary refs log tree commit diff
path: root/minic
diff options
context:
space:
mode:
Diffstat (limited to 'minic')
-rw-r--r--minic/minic.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/minic/minic.y b/minic/minic.y
index 51debca..a466c99 100644
--- a/minic/minic.y
+++ b/minic/minic.y
@@ -137,7 +137,8 @@ varadd(char *v, int glo, unsigned ctyp)
 		}
 		if (strcmp(varh[h].v, v) == 0)
 			die("double definition");
-	} while(++h != h0);
+		h = (h+1) % NVar;
+	} while(h != h0);
 	die("too many variables");
 }