Commit 1f134e44 authored by Anders Iver Gjermo's avatar Anders Iver Gjermo

catch NULL input in interpreter_chat_mode

parent eed4f123
...@@ -560,7 +560,8 @@ void work_modifier (const char *s, int l) { ...@@ -560,7 +560,8 @@ void work_modifier (const char *s, int l) {
void interpreter_chat_mode (char *line) { void interpreter_chat_mode (char *line) {
if (!strncmp (line, "/exit", 5) || !strncmp (line, "/quit", 5)) { if (line == NULL || /* EOF received */
!strncmp (line, "/exit", 5) || !strncmp (line, "/quit", 5)) {
in_chat_mode = 0; in_chat_mode = 0;
update_prompt (); update_prompt ();
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment