diff options
author | rubidium <rubidium@openttd.org> | 2009-03-12 20:43:03 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-03-12 20:43:03 +0000 |
commit | 8216a0f5c99ea249a9a5810ae3f87c8439edd680 (patch) | |
tree | 96379daf1412be72240ca56ae10f019514f58c4e | |
parent | 855b5cd2ba6366f19d2cf9c3122deb870bb43460 (diff) | |
download | openttd-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.
-rw-r--r-- | src/gfxinit.cpp | 6 |
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 { |