summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2009-03-07 20:53:32 +0000
committertruebrain <truebrain@openttd.org>2009-03-07 20:53:32 +0000
commit3adc0d77b86a085f5ce7acaccc23147d6ee33a59 (patch)
tree97cf20e63336d5178abbe75fc44d7cf11837cbcd /src
parent81dde09c279d8ab64345d7d99cb49ccb4c70f10e (diff)
downloadopenttd-3adc0d77b86a085f5ce7acaccc23147d6ee33a59.tar.xz
(svn r15637) -Fix: when you try to protect something from doing something it shouldn't be doing, make sure that the actions happening after that, doesn't start doing what it shouldn't be doing. This of course would only happen in rare corner cases.
Diffstat (limited to 'src')
-rw-r--r--src/gfx.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index a69654ca1..4423bff19 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -294,7 +294,7 @@ static void HandleBiDiAndArabicShapes(char *buffer, const char *lastof)
char *t = buffer;
size_t length = 0;
- while (*t != '\0' && length < lengthof(input_output)) {
+ while (*t != '\0' && length < lengthof(input_output) - 1) {
WChar tmp;
t += Utf8Decode(&tmp, t);
input_output[length++] = tmp;