summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2012-02-04 20:12:06 +0000
committermichi_cc <michi_cc@openttd.org>2012-02-04 20:12:06 +0000
commitc9e664d4cb0f31f0a9b7ca589af8dedd58d2c155 (patch)
tree9d53e811dd781ca327ab68336e961c812787c341 /src
parent4702924f6ed8c3147bb9b63fd103275d1e54ffc0 (diff)
downloadopenttd-c9e664d4cb0f31f0a9b7ca589af8dedd58d2c155.tar.xz
(svn r23894) -Fix (r23893): Use the right variable, not the one that's always going to be 0.
Diffstat (limited to 'src')
-rw-r--r--src/spriteloader/grf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/spriteloader/grf.cpp b/src/spriteloader/grf.cpp
index d359dec40..da4902049 100644
--- a/src/spriteloader/grf.cpp
+++ b/src/spriteloader/grf.cpp
@@ -107,7 +107,7 @@ bool DecodeSingleSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, size_t fi
bool last_item = false;
/* Look up in the header-table where the real data is stored for this row */
int offset;
- if (container_format >= 2 && num > UINT16_MAX) {
+ if (container_format >= 2 && dest_size > UINT16_MAX) {
offset = (dest_orig[y * 4 + 3] << 24) | (dest_orig[y * 4 + 2] << 16) | (dest_orig[y * 4 + 1] << 8) | dest_orig[y * 4];
} else {
offset = (dest_orig[y * 2 + 1] << 8) | dest_orig[y * 2];