diff options
author | rubidium <rubidium@openttd.org> | 2007-06-02 09:26:03 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-06-02 09:26:03 +0000 |
commit | 19d7d1c9c5aa4aa56b9659b5b4b11178f4cbb87f (patch) | |
tree | 2d6500484e0f37593edfbd28d55bbc1b0a3af9df /src | |
parent | fb5072b82440435c1e16eb14f9087bf849d7eb4e (diff) | |
download | openttd-19d7d1c9c5aa4aa56b9659b5b4b11178f4cbb87f.tar.xz |
(svn r10021) -Fix (r9560): memory "corruption" that could lead to a failure to load newgrfs.
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf_gui.cpp | 5 |
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 */ |