winhlp32: Properly detect non-ASCII chars

André Hentschel nerv at dawncrow.de
Sun Feb 17 10:44:44 CST 2013


---
 programs/winhlp32/hlpfile.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/programs/winhlp32/hlpfile.c b/programs/winhlp32/hlpfile.c
index 96c1e75..3c49c33 100644
--- a/programs/winhlp32/hlpfile.c
+++ b/programs/winhlp32/hlpfile.c
@@ -712,7 +712,7 @@ static BOOL HLPFILE_RtfAddText(struct RtfData* rd, const char* str)
     }
     for (last = p = str; *p; p++)
     {
-        if (*p < 0) /* escape non ASCII chars */
+        if (*p & 0x80) /* escape non-ASCII chars */
         {
             static char         xx[8];
             rlen = sprintf(xx, "\\'%x", *(const BYTE*)p);
-- 
1.7.10.4



More information about the wine-patches mailing list