checked getline return value in client main

i hope these comints are sort of intelligent cause im  drunk as hell :dd
This commit is contained in:
Václav Šmejkal 2023-11-18 20:22:04 +01:00
parent 3d6f2b8293
commit f71d3954f0
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -66,7 +66,8 @@ int main(void)
for (;;) for (;;)
{ {
getline(&line, &line_length, stdin); if (getline(&line, &line_length, stdin) == -1) why2_die("Reading input failed.");
printf(WHY2_CLEAR_AND_GO_UP); printf(WHY2_CLEAR_AND_GO_UP);
why2_send_socket(line, "anon", listen_socket); why2_send_socket(line, "anon", listen_socket);