(svn r11282) -Fix[FS#1344]: Use the right pointer when evaluating the size of the layouts.
authorbelugas
Wed, 17 Oct 2007 02:46:21 +0000
changeset 7745 2070fdfd10ba
parent 7744 203522453bc7
child 7746 91c0bb5613c9
(svn r11282) -Fix[FS#1344]: Use the right pointer when evaluating the size of the layouts.
src/newgrf.cpp
--- a/src/newgrf.cpp	Wed Oct 17 01:33:21 2007 +0000
+++ b/src/newgrf.cpp	Wed Oct 17 02:46:21 2007 +0000
@@ -1890,8 +1890,7 @@
 
 							copy_from = (IndustryTileTable*)_origin_industry_specs[type].table[laynbr];
 							for (size = 1;; size++) {
-								if (_origin_industry_specs[type].table[laynbr + (size - 1)]->ti.x == -0x80 &&
-										_origin_industry_specs[type].table[laynbr + (size - 1)]->ti.y == 0) break;
+								if (copy_from[size - 1].ti.x == -0x80 && copy_from[size - 1].ti.y) break;
 							}
 							break;
 						}