* Fix from Bart for issue

This commit is contained in:
Michaël Van Canneyt 2022-10-04 11:14:00 +02:00
parent f8848dd185
commit e736011c37

View File

@ -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;