summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-12 20:43:03 +0000
committerrubidium <rubidium@openttd.org>2009-03-12 20:43:03 +0000
commit8216a0f5c99ea249a9a5810ae3f87c8439edd680 (patch)
tree96379daf1412be72240ca56ae10f019514f58c4e /src
parent855b5cd2ba6366f19d2cf9c3122deb870bb43460 (diff)
downloadopenttd-8216a0f5c99ea249a9a5810ae3f87c8439edd680.tar.xz
(svn r15694) -Codechange/feature/fix: invert the order in which base graphics sets are queried making it fairly unlikely that downloaded graphics sets override the original graphics.
Diffstat (limited to 'src')
-rw-r--r--src/gfxinit.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp
index c6b725514..9dad75aa3 100644
--- a/src/gfxinit.cpp
+++ b/src/gfxinit.cpp
@@ -467,8 +467,10 @@ bool OBGFileScanner::AddFile(const char *filename, size_t basepath_length)
if (duplicate) {
delete graphics;
} else {
- graphics->next = _available_graphics_sets;
- _available_graphics_sets = graphics;
+ GraphicsSet **last = &_available_graphics_sets;
+ while (*last != NULL) last = &(*last)->next;
+
+ *last = graphics;
ret = true;
}
} else {