From 0bb24a392eb5bb5754cb25705e3e07c336cdc83c Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Sun, 16 Sep 2018 11:01:00 +0200 Subject: [PATCH] Fixed crash when replacing first character. --- src/hu_stuff.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 29303157..794a89d7 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -856,6 +856,9 @@ static inline boolean HU_keyInChatString(char *s, char ch) { if (s[m]) s[m+1] = (s[m]); + + if (m < 1) + break; // fix the chat going ham if your replace the first character. (For whatever reason this didn't happen in vanilla????) } s[c_input] = ch; // and replace this. }