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 a466c99..6b4150d 100644
--- a/minic/minic.y
+++ b/minic/minic.y
@@ -162,7 +162,8 @@ varget(char *v)
 			s.ctyp = varh[h].ctyp;
 			return &s;
 		}
-	} while (++h != h0 && varh[h].v[0] != 0);
+		h = (h+1) % NVar;
+	} while (h != h0 && varh[h].v[0] != 0);
 	return 0;
 }