forked from mirror/OpenTTD
(svn r4689) - Codechange: correct parameter order or calloc, and use the sizeof the variable rather than a struct
This commit is contained in:
@@ -795,7 +795,7 @@ static void HandleString(char *str, bool master)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Allocate a new LangString
|
// Allocate a new LangString
|
||||||
ent = calloc(sizeof(LangString), 1);
|
ent = calloc(1, sizeof(*ent));
|
||||||
_strings[_next_string_id] = ent;
|
_strings[_next_string_id] = ent;
|
||||||
ent->index = _next_string_id++;
|
ent->index = _next_string_id++;
|
||||||
ent->name = strdup(str);
|
ent->name = strdup(str);
|
||||||
|
Reference in New Issue
Block a user