Fix using Q_strcpy instead of Q_strncpy

This commit is contained in:
Ruben Gonzalez 2017-08-21 10:35:58 -04:00
parent 3eb297bee1
commit a01e9e510c

View File

@ -48,7 +48,7 @@ DETOUR_DECL_MEMBER3(DetourHandleBuy, int, int, iLoadoutSlot, void *, pWpnDataRef
if (strstr(szClassname, "knife")) if (strstr(szClassname, "knife"))
{ {
Q_strcpy(weaponName, "knife"); Q_strncpy(weaponName, "knife", sizeof(weaponName));
} }
else else
{ {
@ -59,7 +59,7 @@ DETOUR_DECL_MEMBER3(DetourHandleBuy, int, int, iLoadoutSlot, void *, pWpnDataRef
} }
else else
{ {
Q_strcpy(weaponName, szClassname); Q_strncpy(weaponName, szClassname, sizeof(weaponName));
} }
} }