changeset 11 | a769385a59c6 |
parent 10 | 311ea5fa60dd |
child 15 | f19c1f9b4cd3 |
--- a/src/main.c +++ b/src/main.c @@ -90,12 +90,12 @@ } while (!feof (message.stream)) { - *buf = 0; + *buf = '\0'; fgets (buf, 512, message.stream); if ((command = irc_parsemessage (buf, &message))) { printf ("%10s %s %s\n", command, message.channel, message.line); - if (!strcmp (command, "ERROR")) + if (!strcmp (command, "ERROR") || !strcmp (command, "ENOMEM")) break; } else { if ((msg = parse (&message)) != NULL) {