diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2017-02-01 13:46:08 -0500 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2017-02-01 13:47:29 -0500 |
commit | 4d656383d8342601aef508bd6141b1c9632d50a0 (patch) | |
tree | 717d0128112c71458addb5f2398321b21e986b17 /minic | |
parent | cec21e6540ee2ddf6ad874f50ef1c69631ec37a4 (diff) | |
download | roux-4d656383d8342601aef508bd6141b1c9632d50a0.tar.gz |
fix bug in varadd(), thanks Ed Davis
Diffstat (limited to 'minic')
-rw-r--r-- | minic/minic.y | 3 |
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"); } |