* add missing condition for empty string in Unicode uppercase and lowercase conversion routines

git-svn-id: trunk@29625 -
This commit is contained in:
Tomas Hajny 2015-02-04 14:35:01 +00:00
parent 35a84ab6bd
commit 5a56228011

View File

@ -1221,8 +1221,9 @@ var
I: cardinal;
begin
SetLength (Result, Length (S));
for I := 0 to Pred (Length (S)) do
PWideChar (Result) [I] := Sys_UniToUpper (S [Succ (I)]);
if Length (S) > 0 then
for I := 0 to Pred (Length (S)) do
PWideChar (Result) [I] := Sys_UniToUpper (S [Succ (I)]);
end;
@ -1231,8 +1232,9 @@ var
I: cardinal;
begin
SetLength (Result, Length (S));
for I := 0 to Pred (Length (S)) do
PWideChar (Result) [I] := Sys_UniToLower (S [Succ (I)]);
if Length (S) > 0 then
for I := 0 to Pred (Length (S)) do
PWideChar (Result) [I] := Sys_UniToLower (S [Succ (I)]);
end;
@ -1242,9 +1244,10 @@ var
begin
Result := S;
UniqueString (Result);
for I := 1 to Length (S) do
if Result [I] = WNull then
Result [I] := ' ';
if Length (S) > 0 then
for I := 1 to Length (S) do
if Result [I] = WNull then
Result [I] := ' ';
end;