summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--frontends/ilang/lexer.l4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontends/ilang/lexer.l b/frontends/ilang/lexer.l
index 5da8ce67..00091927 100644
--- a/frontends/ilang/lexer.l
+++ b/frontends/ilang/lexer.l
@@ -131,8 +131,8 @@ void update_autoidx(const char *p)
q++;
if ((q - p) < 10) {
int idx = atoi(p);
- if (idx > RTLIL::autoidx)
- RTLIL::autoidx = idx;
+ if (idx >= RTLIL::autoidx)
+ RTLIL::autoidx = idx+1;
}
}
}