diff --git a/VERSION b/VERSION index 47d3fe3..b05db56 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.5.256 +1.5.257 diff --git a/base/verilog.c b/base/verilog.c index 9ba310c..f74d7ff 100644 --- a/base/verilog.c +++ b/base/verilog.c @@ -1898,12 +1898,21 @@ skip_endmodule: if (i != -1) snprintf(nodename, MAX_STR_LEN, "%s[%d]", noderoot, i); - else + else if (lhs != NULL) strncpy(nodename, lhs->name, MAX_STR_LEN - 1); + else { + Printf("Error: Improper node name \"%s\".\n", noderoot); + goto skip_endmodule; + } if (j != -1) snprintf(assignname, MAX_STR_LEN, "%s[%d]", assignroot, j); - else + else if (rhs != NULL) strncpy(assignname, rhs->name, MAX_STR_LEN - 1); + else { + Printf("Error: Improper assignment name \"%s\".\n", + assignroot); + goto skip_endmodule; + } join(nodename, assignname);