Fix string corruption, bug780.

This commit is contained in:
Wilson Snyder
2014-06-08 21:36:18 -04:00
parent 69468708e2
commit 6cf50e6579
23 changed files with 126 additions and 88 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ private:
return "Verilator trace_off";
}
else if (!v3Global.opt.traceUnderscore()) {
if (prettyName.c_str()[0] == '_')
if (prettyName.size()>=1 && prettyName[0] == '_')
return "Leading underscore";
if (prettyName.find("._") != string::npos)
return "Inlined leading underscore";