From 365ad30c20812c4835a7d83ba8c7d8add18813f5 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Sat, 17 Oct 2015 06:55:52 +0600 Subject: [PATCH] Fix: not read configuration the files at rehlds_fixes (bug in Cbuf_InsertTextLines) --- rehlds/engine/cmd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rehlds/engine/cmd.cpp b/rehlds/engine/cmd.cpp index 4224795..908a0eb 100644 --- a/rehlds/engine/cmd.cpp +++ b/rehlds/engine/cmd.cpp @@ -131,8 +131,8 @@ void Cbuf_InsertTextLines(char *text) #ifdef REHLDS_FIXES if (currLen) - Q_memmove(cmd_text.data + addLen + 1, cmd_text.data, currLen); - + Q_memmove(cmd_text.data + addLen + 2, cmd_text.data, currLen); + cmd_text.data[0] = '\n'; // TODO: Why we need leading \n, if there is no commands in the start? Q_memcpy(&cmd_text.data[1], text, addLen); cmd_text.data[addLen + 1] = '\n';