summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-02 09:26:03 +0000
committerrubidium <rubidium@openttd.org>2007-06-02 09:26:03 +0000
commit62c20a969886a30ff4b2459e072d6316e08d042d (patch)
tree2d6500484e0f37593edfbd28d55bbc1b0a3af9df /src/newgrf_gui.cpp
parent8f361393ddd26f2f1a08a108bb74c6bbfc6cab56 (diff)
downloadopenttd-62c20a969886a30ff4b2459e072d6316e08d042d.tar.xz
(svn r10021) -Fix (r9560): memory "corruption" that could lead to a failure to load newgrfs.
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r--src/newgrf_gui.cpp5
1 files changed, 3 insertions, 2 deletions
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<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 */