Alexandre Julliard : ntdll: Fixed the null bytes check in RtlIsTextUnicode.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 30 16:52:28 CDT 2007


Module: wine
Branch: master
Commit: 43519e415d8712850e51672a189d8a687b5e6c05
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=43519e415d8712850e51672a189d8a687b5e6c05

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jul 30 20:17:24 2007 +0200

ntdll: Fixed the null bytes check in RtlIsTextUnicode.

---

 dlls/ntdll/rtlstr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/rtlstr.c b/dlls/ntdll/rtlstr.c
index 2a54223..1b13f12 100644
--- a/dlls/ntdll/rtlstr.c
+++ b/dlls/ntdll/rtlstr.c
@@ -1636,7 +1636,7 @@ BOOLEAN WINAPI RtlIsTextUnicode( LPCVOID buf, INT len, INT *pf )
     {
         for (i = 0; i < len; i++)
         {
-            if (!s[i])
+            if (!(s[i] & 0xff) || !(s[i] >> 8))
             {
                 out_flags |= IS_TEXT_UNICODE_NULL_BYTES;
                 break;




More information about the wine-cvs mailing list