summaryrefslogtreecommitdiff
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
commitbc56b0edf7c8701a908801146cd1df10d2fea209 (patch)
tree97cf20e63336d5178abbe75fc44d7cf11837cbcd
parent08aa32893429b21cd2053daf41337a838f0ee555 (diff)
downloadopenttd-bc56b0edf7c8701a908801146cd1df10d2fea209.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.
-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;