Fix assertion failure when no value supplied with -P option (GitHub issue #377)
This commit is contained in:
parent
359b2b65c2
commit
d6e01d0c55
2
pform.cc
2
pform.cc
|
|
@ -297,7 +297,7 @@ void parm_to_defparam_list(const string¶m)
|
|||
|
||||
// Is it a decimal number?
|
||||
num = (value[0] == '-') ? value + 1 : value;
|
||||
if (is_dec_digit_str(num)) {
|
||||
if (num[0] != '\0' && is_dec_digit_str(num)) {
|
||||
verinum *val = make_unsized_dec(num);
|
||||
if (value[0] == '-') *val = -(*val);
|
||||
PExpr* ndec = new PENumber(val);
|
||||
|
|
|
|||
Loading…
Reference in New Issue