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