From f4c234073a27d82c3556ae9a327a5e2de09fc97f Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Wed, 7 Dec 2016 17:41:57 +1000 Subject: [PATCH] Possibly fixed a bug in magiedit --- utils/magiedit/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/magiedit/main.c b/utils/magiedit/main.c index 92e4dd4..d4f6430 100644 --- a/utils/magiedit/main.c +++ b/utils/magiedit/main.c @@ -509,7 +509,7 @@ char *message_editor() { } } - } else { + } else if (ch.chKeyPress != '\n') { if (position_x >= strlen(line)) { strncat(line, &ch.chKeyPress, 1); } else { @@ -705,7 +705,7 @@ int main(int argc, char **argv) } quote_line_count = 0; if (!noquote) { - fgets(buffer, 74, fptr); + fgets(buffer, 73, fptr); while (!feof(fptr)) { for (i=strlen(buffer) - 1; i > 0; i--) { if (buffer[i] != '\r' && buffer[i] != '\n') { @@ -727,7 +727,7 @@ int main(int argc, char **argv) quote_line_count++; - fgets(buffer, 74, fptr); + fgets(buffer, 73, fptr); } fclose(fptr); unlink(msgtmp);