From bc56b0edf7c8701a908801146cd1df10d2fea209 Mon Sep 17 00:00:00 2001 From: truebrain Date: Sat, 7 Mar 2009 20:53:32 +0000 Subject: (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. --- src/gfx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2