diff --git a/engine/common/cmd.c b/engine/common/cmd.c index f67a3d987..3e67fe0d8 100644 --- a/engine/common/cmd.c +++ b/engine/common/cmd.c @@ -309,7 +309,7 @@ start: { i++; cmd_text[level].buf.cursize -= i; - Q_memcpy (text, text+i, cmd_text[level].buf.cursize); + Q_memmove (text, text+i, cmd_text[level].buf.cursize); } // Con_Printf("Found \"%s\"\n", line); @@ -387,7 +387,7 @@ void Cbuf_ExecuteLevel (int level) { i++; cmd_text[level].buf.cursize -= i; - Q_memcpy (text, text+i, cmd_text[level].buf.cursize); + Q_memmove (text, text+i, cmd_text[level].buf.cursize); } // execute the command line diff --git a/engine/common/common.h b/engine/common/common.h index a411888a5..adc9ec102 100644 --- a/engine/common/common.h +++ b/engine/common/common.h @@ -178,6 +178,7 @@ int wildcmp(const char *wild, const char *string); //1 if match #define Q_memset(d, f, c) memset((d), (f), (c)) #define Q_memcpy(d, s, c) memcpy((d), (s), (c)) +#define Q_memmove(d, s, c) memmove((d), (s), (c)) #define Q_memcmp(m1, m2, c) memcmp((m1), (m2), (c)) #define Q_strcpy(d, s) strcpy((d), (s)) #define Q_strncpy(d, s, n) strncpy((d), (s), (n))