shithub: qk1

Download patch

ref: 2dd504bd72ad563ac985b3bcaef4075a39d16bc1
parent: a4cbb5ee6ff9af7ec74f2c72204971a4091139f1
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Thu Jan 25 20:53:10 EST 2024

Cbuf_Execute: memmove instead of memcpy since it's the same buffer

--- a/cmd.c
+++ b/cmd.c
@@ -138,7 +138,7 @@
 		}
 
 
-		memcpy (line, text, i);
+		memcpy(line, text, i);
 		line[i] = 0;
 
 		// delete the text from the command buffer and move remaining commands down
@@ -151,7 +151,7 @@
 		{
 			i++;
 			cmd_text.cursize -= i;
-			memcpy(text, text+i, cmd_text.cursize);
+			memmove(text, text+i, cmd_text.cursize);
 		}
 
 		// execute the command line