From: Jay Freeman (saurik) Date: Thu, 2 Jan 2014 07:25:45 +0000 (-0800) Subject: Move the EOF "final newline" to the ctrl-d check. X-Git-Tag: v0.9.500~108 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/7935799653507b33ee117bdacd2691a2b7210528 Move the EOF "final newline" to the ctrl-d check. --- diff --git a/Console.cpp b/Console.cpp index e65e630..d353178 100644 --- a/Console.cpp +++ b/Console.cpp @@ -485,9 +485,10 @@ static void Console(CYOptions &options) { char *line(readline(prompt)); mode_ = Working; - if (line == NULL) + if (line == NULL) { + *out_ << std::endl; break; - if (line[0] == '\0') + } else if (line[0] == '\0') goto read; if (!extra) { @@ -596,8 +597,6 @@ static void Console(CYOptions &options) { Run(client_, syntax, code, out_, expand); } - - *out_ << std::endl; } static void *Map(const char *path, size_t *psize) {