changeset 19037:3ddfadaa6d86 draft

(svn r23894) -Fix (r23893): Use the right variable, not the one that's always going to be 0.
author michi_cc <michi_cc@openttd.org>
date Sat, 04 Feb 2012 20:12:06 +0000
parents ca6c588c2baa
children 3743960db0e1 480a5e6e48f6
files src/spriteloader/grf.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/spriteloader/grf.cpp
+++ b/src/spriteloader/grf.cpp
@@ -107,7 +107,7 @@
 			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];