better invalid numeral error message

* invalid numeral error message now indicates which numerals are valid

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
This commit is contained in:
Daniel Santos 2022-03-13 14:28:09 +00:00
parent f44be5f3b4
commit 428eecbdcb
1 changed files with 2 additions and 1 deletions

View File

@ -230,9 +230,10 @@ main(int argc, char* argv[])
/* Check if number belongs to it's numerical system */
if( !is_valid_number(from, number) )
{
fprintf(stderr, "error: %s: %s.\nValid numerals are: \"%s\"\n",
PROG_NAME, strerror(EDOM), from);
free(from);
free(to);
fprintf(stderr, "error: %s: %s.\n", PROG_NAME, strerror(EDOM));
exit(EDOM);
}