mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 11:09:14 +02:00
* add missing condition for empty string in Unicode uppercase and lowercase conversion routines
git-svn-id: trunk@29625 -
This commit is contained in:
parent
35a84ab6bd
commit
5a56228011
@ -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;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user