[USP10]
[reactos.git] / reactos / dll / win32 / usp10 / shape.c
index d30a615..e7d1558 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  *
  */
-#include <stdarg.h>
-#include <stdlib.h>
-
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h"
-#include "winnls.h"
-#include "usp10.h"
-#include "winternl.h"
 
 #include "usp10_internal.h"
 
-#include "wine/debug.h"
-
 WINE_DEFAULT_DEBUG_CHANNEL(uniscribe);
 
 #define FIRST_ARABIC_CHAR 0x0600
@@ -931,7 +919,7 @@ static void mark_invalid_combinations(HDC hdc, const WCHAR* pwcChars, INT cChars
        context_type[i] = lex(pwcChars[i]);
 
     GetGlyphIndicesW(hdc, &invalid, 1, &invalid_glyph, 0);
-    for (i = 1, g=1; i < cChars; i++, g++)
+    for (i = 1, g=1; i < cChars - 1; i++, g++)
     {
         if (context_type[i] != 0 && context_type[i+write_dir]==context_type[i])
         {