From 62c20a969886a30ff4b2459e072d6316e08d042d Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 2 Jun 2007 09:26:03 +0000 Subject: (svn r10021) -Fix (r9560): memory "corruption" that could lead to a failure to load newgrfs. --- src/newgrf_gui.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index bd0aefb01..22335c3d1 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -186,8 +186,9 @@ static void NewGRFAddDlgWndProc(Window *w, WindowEvent *e) GRFConfig *c = CallocT(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 */ -- cgit v1.2.3-70-g09d2