diff options
author | H. Peter Anvin <hpa@zytor.com> | 2019-06-06 17:17:16 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2019-06-06 17:17:16 -0700 |
commit | 236f4a832b9a226a4492b873aeead022e4ea63b9 (patch) | |
tree | 4a4353bc9b01543ab5c8134aa533dcf20c8e1242 /asm/parser.c | |
parent | d4b20355d224d58944faf0731365f8a3764eb2e5 (diff) | |
download | nasm-236f4a832b9a226a4492b873aeead022e4ea63b9.tar.gz |
strfunc: better error messages if a string transform fails
Let the user know what string transform actually failed on them.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'asm/parser.c')
-rw-r--r-- | asm/parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/asm/parser.c b/asm/parser.c index 9f38844f..fce973b9 100644 --- a/asm/parser.c +++ b/asm/parser.c @@ -612,14 +612,14 @@ restart_parse: if (i != TOKEN_STR) { nasm_nonfatal("%s must be followed by a string constant", funcname); - eop->type = EOT_NOTHING; + eop->type = EOT_NOTHING; } else { eop->type = EOT_DB_STRING_FREE; eop->stringlen = string_transform(tokval.t_charptr, tokval.t_inttwo, &eop->stringval, func); if (eop->stringlen == (size_t)-1) { - nasm_nonfatal("invalid string for transform"); + nasm_nonfatal("invalid input string to %s", funcname); eop->type = EOT_NOTHING; } } |