]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - console.c
fix a few clang warnings that try to hint to buffer overruns
[xonotic/darkplaces.git] / console.c
index 831c30a9f35a8dbfdff36f1e52ad53590e74ef25..46b5840574c8922873cec49da297d7948af55bc0 100644 (file)
--- a/console.c
+++ b/console.c
@@ -2485,7 +2485,7 @@ static void Nicks_CutMatchesAlphaNumeric(int count)
        if(Nicks_strcleanlen(Nicks_sanlist[0]) < strlen(tempstr))
        {
                // if the clean sanitized one is longer than the current one, use it, it has crap chars which definitely are in there
-               strlcpy(Nicks_sanlist[0], tempstr, sizeof(tempstr));
+               strlcpy(Nicks_sanlist[0], tempstr, sizeof(Nicks_sanlist[0]));
        }
 }
 
@@ -2541,7 +2541,7 @@ static void Nicks_CutMatchesNoSpaces(int count)
        if(Nicks_strcleanlen(Nicks_sanlist[0]) < strlen(tempstr))
        {
                // if the clean sanitized one is longer than the current one, use it, it has crap chars which definitely are in there
-               strlcpy(Nicks_sanlist[0], tempstr, sizeof(tempstr));
+               strlcpy(Nicks_sanlist[0], tempstr, sizeof(Nicks_sanlist[0]));
        }
 }