Fix assertion failure when no value supplied with -P option (GitHub issue #377)

This commit is contained in:
Martin Whitaker 2020-10-24 22:48:00 +01:00
parent 359b2b65c2
commit d6e01d0c55
1 changed files with 1 additions and 1 deletions

View File

@ -297,7 +297,7 @@ void parm_to_defparam_list(const string&param)
// 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);