mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 11:10:23 +02:00
MaskEdit: simplify the fix in #79c00942.
This commit is contained in:
parent
e27cc45f6c
commit
f5dd7766de
@ -1811,11 +1811,11 @@ begin
|
|||||||
end//FMaskSave = True
|
end//FMaskSave = True
|
||||||
else
|
else
|
||||||
begin//FMaskSave = False
|
begin//FMaskSave = False
|
||||||
if FTrimType = metTrimRight then
|
//while GetCodePoint does not crash on an empty string (and it does not return a #32), it sort of worked by accident in that scenario
|
||||||
|
//and it crashed in similar function in MaskUtils because of that, see: https://forum.lazarus.freepascal.org/index.php/topic,60803.0.html
|
||||||
|
if (Value <> '') then
|
||||||
begin
|
begin
|
||||||
//while GetCodePoint does not crash on an empty string (and it does not return a #32), it sort of worked by accident in that scenario
|
if FTrimType = metTrimRight then
|
||||||
//and it crashed in similar function in MaskUtils because of that, see: https://forum.lazarus.freepascal.org/index.php/topic,60803.0.html
|
|
||||||
if (Value <> '') then
|
|
||||||
begin
|
begin
|
||||||
//fill text from left to rigth, skipping MaskLiterals
|
//fill text from left to rigth, skipping MaskLiterals
|
||||||
j := 1;
|
j := 1;
|
||||||
@ -1828,13 +1828,10 @@ begin
|
|||||||
if j > Utf8Length(Value) then Break;
|
if j > Utf8Length(Value) then Break;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end
|
||||||
end
|
else
|
||||||
else
|
|
||||||
begin
|
|
||||||
//fill text from right to left, skipping MaskLiterals
|
|
||||||
if (Value <> '') then
|
|
||||||
begin
|
begin
|
||||||
|
//fill text from right to left, skipping MaskLiterals
|
||||||
j := Utf8Length(Value);
|
j := Utf8Length(Value);
|
||||||
for i := FMaskLength downto 1 do
|
for i := FMaskLength downto 1 do
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user