Bugfix in ilang frontend autoidx recovery
authorClifford Wolf <clifford@clifford.at>
Fri, 7 Mar 2014 16:19:14 +0000 (17:19 +0100)
committerClifford Wolf <clifford@clifford.at>
Fri, 7 Mar 2014 16:19:14 +0000 (17:19 +0100)
frontends/ilang/lexer.l

index 5da8ce6757440502e32e6769d5a0406c828eefa2..000919275a93341130fcff04d7ce6d6be97a4df0 100644 (file)
@@ -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;
                        }
                }
        }