mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
(svn r10021) -Fix (r9560): memory "corruption" that could lead to a failure to load newgrfs.
This commit is contained in:
parent
fb5072b824
commit
19d7d1c9c5
@ -186,8 +186,9 @@ static void NewGRFAddDlgWndProc(Window *w, WindowEvent *e)
|
|||||||
GRFConfig *c = CallocT<GRFConfig>(1);
|
GRFConfig *c = CallocT<GRFConfig>(1);
|
||||||
*c = *src;
|
*c = *src;
|
||||||
c->filename = strdup(src->filename);
|
c->filename = strdup(src->filename);
|
||||||
if (src->name != NULL) c->name = strdup(src->name);
|
if (src->full_path != NULL) c->full_path = strdup(src->full_path);
|
||||||
if (src->info != NULL) c->info = strdup(src->info);
|
if (src->name != NULL) c->name = strdup(src->name);
|
||||||
|
if (src->info != NULL) c->info = strdup(src->info);
|
||||||
c->next = NULL;
|
c->next = NULL;
|
||||||
|
|
||||||
/* Append GRF config to configuration list */
|
/* Append GRF config to configuration list */
|
||||||
|
Loading…
Reference in New Issue
Block a user