From 3ab3302c51960212b3ed51d92da140e8f93105ce Mon Sep 17 00:00:00 2001 From: Nicholas Tay Date: Thu, 13 Jan 2022 23:23:22 +1100 Subject: Fix + add error message --- passgen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/passgen.c b/passgen.c index d0a8dc9..e759766 100644 --- a/passgen.c +++ b/passgen.c @@ -131,6 +131,7 @@ int main(int argc, char *argv[]) */ grammar = build_grammar(atoi(argv[1]), atoi(argv[2]), atoi(argv[3]), &grammar_size); if (grammar == NULL) { + fprintf(stderr, "ERROR: Could not initialise memory for password grammar.\n"); err = true; goto cleanup; } @@ -147,7 +148,7 @@ int main(int argc, char *argv[]) password[grammar_size] = 0; if (!init_rng()) { - fprintf(stderr, "ERROR: Could not initialise RNG."); + fprintf(stderr, "ERROR: Could not initialise RNG.\n"); err = true; goto cleanup; } -- cgit