From: Côme Chilliet Date: Mon, 2 Jan 2017 16:25:18 +0000 (+0100) Subject: Replaced a strcpy by strncpy X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=baf6f2aaa0271b401b47fe2fdb6eee50e6784bcf;hp=03fbcc5b5e18dbf62c48849fc8d02cd250aa744e;p=lugaru.git Replaced a strcpy by strncpy --- diff --git a/Source/Devtools/ConsoleCmds.cpp b/Source/Devtools/ConsoleCmds.cpp index f69984b..b9aabcc 100644 --- a/Source/Devtools/ConsoleCmds.cpp +++ b/Source/Devtools/ConsoleCmds.cpp @@ -142,7 +142,7 @@ static void set_clothes(int pnum, const char *args) snprintf(buf, 63, "Textures/%s.png", args); int id = Person::players[pnum]->numclothes; - strcpy(Person::players[pnum]->clothes[id], buf); + strncpy(Person::players[pnum]->clothes[id], buf, 64); Person::players[pnum]->clothestintr[id] = tintr; Person::players[pnum]->clothestintg[id] = tintg; Person::players[pnum]->clothestintb[id] = tintb;