Michael Stefaniuc : riched20: Use a wchar string literal for the array of neutral chars.

Alexandre Julliard julliard at winehq.org
Thu Nov 19 16:10:22 CST 2020


Module: wine
Branch: master
Commit: 12821cbb75189401d09c0ef6076737f3c6eef59e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=12821cbb75189401d09c0ef6076737f3c6eef59e

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Sun Nov 15 23:11:17 2020 +0100

riched20: Use a wchar string literal for the array of neutral chars.

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/riched20/editor.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index d89735acc82..f0662682044 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -5310,13 +5310,13 @@ static int __cdecl wchar_comp( const void *key, const void *elem )
 static BOOL isurlneutral( WCHAR c )
 {
     /* NB this list is sorted */
-    static const WCHAR neutral_chars[] = {'!','\"','\'','(',')',',','-','.',':',';','<','>','?','[',']','{','}'};
+    static const WCHAR neutral_chars[] = L"!\"'(),-.:;<>?[]{}";
 
     /* Some shortcuts */
     if (isalnum( c )) return FALSE;
-    if (c > neutral_chars[ARRAY_SIZE( neutral_chars ) - 1]) return FALSE;
+    if (c > L'}') return FALSE;
 
-    return !!bsearch( &c, neutral_chars, ARRAY_SIZE( neutral_chars ), sizeof(c), wchar_comp );
+    return !!bsearch( &c, neutral_chars, ARRAY_SIZE( neutral_chars ) - 1, sizeof(c), wchar_comp );
 }
 
 /**




More information about the wine-cvs mailing list