mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-30 16:30:43 +00:00
Fix a pile of sizeof goofs.
While scan-build wasn't what I was looking for, it has proven useful anyway: many of the sizeof errors were just noise, but a few were actual bugs (allocating too much or too little memory).
This commit is contained in:
parent
575a67b2a1
commit
8fd5be0ee0
15 changed files with 16 additions and 16 deletions
|
@ -108,7 +108,7 @@ source_path_f (cvar_t *var)
|
|||
for (i = 2, s = source_path_string; *s; s++)
|
||||
if (*s == ';')
|
||||
i++;
|
||||
source_paths = malloc (i * sizeof (char **));
|
||||
source_paths = malloc (i * sizeof (char *));
|
||||
source_paths[0] = source_path_string;
|
||||
for (i = 1, s = source_path_string; *s; s++)
|
||||
if (*s == ';') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue