FIX: Incorrect sorting in some cases

This commit is contained in:
Alexander Koblov 2010-07-17 10:05:56 +00:00
commit fed7a0d56c

View file

@ -1316,6 +1316,12 @@ begin
// compare string part
while (true) do
begin
if ((str1^ = #0) and (str2^ <> #0)) then
exit(-1);
if ((str2^ = #0) and (str1^ <> #0)) then
exit(+1);
is_digit1 := is_digit(str1^);
is_digit2 := is_digit(str2^);
@ -1327,12 +1333,6 @@ begin
if (is_digit2 and not is_digit1) then
exit(+1);
if ((str1^ = #0) and (str2^ <> #0)) then
exit(-1);
if ((str2^ = #0) and (str1^ <> #0)) then
exit(+1);
if CaseSensitive then
string_result:= WideCompareStr(str1^, str2^)
else