(svn r10021) -Fix (r9560): memory "corruption" that could lead to a failure to load newgrfs.
authorrubidium
Sat, 02 Jun 2007 09:26:03 +0000
changeset 7279 cbc7fe26facf
parent 7278 f297b439fe6e
child 7280 358095cd3c51
(svn r10021) -Fix (r9560): memory "corruption" that could lead to a failure to load newgrfs.
src/newgrf_gui.cpp
--- a/src/newgrf_gui.cpp	Sat Jun 02 09:11:06 2007 +0000
+++ b/src/newgrf_gui.cpp	Sat Jun 02 09:26:03 2007 +0000
@@ -186,8 +186,9 @@
 						GRFConfig *c = CallocT<GRFConfig>(1);
 						*c = *src;
 						c->filename = strdup(src->filename);
-						if (src->name != NULL) c->name = strdup(src->name);
-						if (src->info != NULL) c->info = strdup(src->info);
+						if (src->full_path != NULL) c->full_path = strdup(src->full_path);
+						if (src->name      != NULL) c->name      = strdup(src->name);
+						if (src->info      != NULL) c->info      = strdup(src->info);
 						c->next = NULL;
 
 						/* Append GRF config to configuration list */