mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 10:19:28 +02:00
* Fix from Bart for issue #39938
This commit is contained in:
parent
f8848dd185
commit
e736011c37
@ -780,31 +780,34 @@ begin
|
||||
end//FMaskSave = True
|
||||
else
|
||||
begin//FMaskSave = False
|
||||
if FTrimType = metTrimRight then
|
||||
if Value<>'' then
|
||||
begin
|
||||
//fill text from left to rigth, skipping MaskLiterals
|
||||
j := 1;
|
||||
for i := 1 to FMaskLength do
|
||||
if FTrimType = metTrimRight then
|
||||
begin
|
||||
if not IsLiteral(FMask[i]) then
|
||||
//fill text from left to rigth, skipping MaskLiterals
|
||||
j := 1;
|
||||
for i := 1 to FMaskLength do
|
||||
begin
|
||||
if (AValue[j] = #32) then S[i]:= FSpaceChar else S[i] := AValue[j];
|
||||
Inc(j);
|
||||
if j > Length(AValue) then Break;
|
||||
if not IsLiteral(FMask[i]) then
|
||||
begin
|
||||
if (AValue[j] = #32) then S[i]:= FSpaceChar else S[i] := AValue[j];
|
||||
Inc(j);
|
||||
if j > Length(AValue) then Break;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
//fill text from right to left, skipping MaskLiterals
|
||||
j := Length(AValue);
|
||||
for i := FMaskLength downto 1 do
|
||||
end
|
||||
else
|
||||
begin
|
||||
if not IsLiteral(FMask[i]) then
|
||||
//fill text from right to left, skipping MaskLiterals
|
||||
j := Length(AValue);
|
||||
for i := FMaskLength downto 1 do
|
||||
begin
|
||||
if (AValue[j] = #32) then S[i] := FSpaceChar else S[i] := AValue[j];
|
||||
Dec(j);
|
||||
if j < 1 then Break;
|
||||
if not IsLiteral(FMask[i]) then
|
||||
begin
|
||||
if (AValue[j] = #32) then S[i] := FSpaceChar else S[i] := AValue[j];
|
||||
Dec(j);
|
||||
if j < 1 then Break;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user