* Sync up to trunk head (r64921).
[reactos.git] / dll / win32 / usp10 / shape.c
index 529cd53..67afd91 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])
         {
@@ -2184,7 +2172,8 @@ static inline int unicode_lex(WCHAR c)
         case 0x0407: return lex_Composed_Vowel;
         case 0x0507: return lex_Matra_above;
         case 0x0607: return lex_Matra_below;
-        case 0x000c: return lex_Ra;
+        case 0x000c:
+        case 0x0015: return lex_Ra;
     };
 }