2
0
mirror of https://github.com/rehlds/metamod-r.git synced 2025-02-05 10:10:38 +03:00
This commit is contained in:
asmodai 2017-05-09 00:21:37 +03:00
parent d1c69657fe
commit 58d54dfa4f

View File

@ -391,7 +391,7 @@ char *MPlugin::resolve_suffix(char *path) const
if (stat(path, &st) == 0 && S_ISREG(st.st_mode)) {
static char buf[PATH_MAX];
strncpy(buf, path, sizeof buf - 1);
buf[sizeof buf - 1];
buf[sizeof buf - 1] = '\0';
return buf;
}