From 85e59a64a35fe933251d33c4486ab04704aa56fc Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sun, 10 Sep 2017 13:17:51 +1000 Subject: [PATCH] Attempt to fix crashes in magiedit --- utils/magiedit/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/magiedit/main.c b/utils/magiedit/main.c index 81826fd..386ada3 100644 --- a/utils/magiedit/main.c +++ b/utils/magiedit/main.c @@ -176,7 +176,7 @@ char *message_editor() { if (ch.chKeyPress == 27) { // got an escape that i shouldnt have stage = 1; - } else */if (ch.chKeyPress == '\r' || (strlen(line) >= 73 && ch.chKeyPress != '\b')) { + } else */if (ch.chKeyPress == '\r' || (strlen(line) >= 73 && ch.chKeyPress > 31 && ch.chKeyPress != 127)) { if (strlen(line) >= 73 && ch.chKeyPress != '\r') { if (position_x == strlen(line)) { strncat(line, &ch.chKeyPress, 1);