mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 23:11:38 +00:00
[mode] Fix a sizeof error
I'm surprised that got past gcc, but it's nice clang caught it.
This commit is contained in:
parent
0bb562f93f
commit
78089a0e99
1 changed files with 1 additions and 1 deletions
|
@ -178,7 +178,7 @@ Mod_RealLoadModel (model_t *mod, qboolean crash, cache_allocator_t allocator)
|
|||
}
|
||||
|
||||
char *name = QFS_FileBase (mod->path);
|
||||
strncpy (mod->name, name, sizeof (mod->name - 1));
|
||||
strncpy (mod->name, name, sizeof (mod->name) - 1);
|
||||
mod->name[sizeof (mod->name) - 1] = 0;
|
||||
free (name);
|
||||
|
||||
|
|
Loading…
Reference in a new issue