crash when dyninput returns NULL (error)

This commit is contained in:
Roland W-H 2022-11-19 16:44:34 +00:00
parent 51cd993b61
commit 4ba0eab83e
1 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,11 @@ int main()
fputs("Enter your message text: ", stdout);
char* msg = dyninput_str(INT64_MAX);
if (!msg)
{
puts("ERROR: String input failed! Exiting...");
return -1;
}
fputs("Enter your key (shift value): ", stdout);
fgets(buf, 4, stdin);