From 7935799653507b33ee117bdacd2691a2b7210528 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 1 Jan 2014 23:25:45 -0800 Subject: [PATCH] Move the EOF "final newline" to the ctrl-d check. --- Console.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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) { -- 2.47.2