jscript: Fix the lexicographical order of the String class properties array.
authorAndrew Nguyen <arethusa26@gmail.com>
Wed, 10 Dec 2008 09:06:21 +0000 (03:06 -0600)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 10 Dec 2008 10:33:00 +0000 (11:33 +0100)
The find_builtin_prop internal routine in dispex.c implements a binary
search with the requirement that a class properties array be in
ascending order, so this fix allows String's properties array to
satisfy this requirement and allows the tests for String.sub() to
pass.

dlls/jscript/string.c

index 5e93fa275dc38f78b3347b3e229e6789b4b1b23f..6dff58ecf175cb92ceb27abdf47aeb40c185bda9 100644 (file)
@@ -1261,9 +1261,9 @@ static const builtin_prop_t String_props[] = {
     {smallW,                 String_small,                 PROPF_METHOD},
     {splitW,                 String_split,                 PROPF_METHOD},
     {strikeW,                String_strike,                PROPF_METHOD},
-    {substringW,             String_substring,             PROPF_METHOD},
-    {substrW,                String_substr,                PROPF_METHOD},
     {subW,                   String_sub,                   PROPF_METHOD},
+    {substrW,                String_substr,                PROPF_METHOD},
+    {substringW,             String_substring,             PROPF_METHOD},
     {supW,                   String_sup,                   PROPF_METHOD},
     {toLocaleLowerCaseW,     String_toLocaleLowerCase,     PROPF_METHOD},
     {toLocaleUpperCaseW,     String_toLocaleUpperCase,     PROPF_METHOD},