changeset 9907:8ddaada26620 draft

(svn r14057) -Fix: NewGRF text stack's "push word" didn't move the data around properly (minime)
author rubidium <rubidium@openttd.org>
date Tue, 12 Aug 2008 22:12:14 +0000
parents b5cdbf8eadf3
children 090efbc71565
files src/newgrf_text.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/newgrf_text.cpp
+++ b/src/newgrf_text.cpp
@@ -544,8 +544,8 @@
 		if (this->position >= 2) {
 			this->position -= 2;
 		} else {
-			for (uint i = lengthof(stack) - 3; i >= this->position; i--) {
-				this->stack[this->position + 2] = this->stack[this->position];
+			for (int i = lengthof(stack) - 1; i >= this->position + 2; i--) {
+				this->stack[i] = this->stack[i - 2];
 			}
 		}
 		this->stack[this->position]     = GB(word, 0, 8);