Skip to content
GitLab
    • Why GitLab
    • Pricing
    • Contact Sales
    • Explore
  • Why GitLab
  • Pricing
  • Contact Sales
  • Explore
  • Sign in
  • Get free trial
  • FPC
  • LazarusLazarus
  • LazarusLazarus
  • Issues
  • #38505

MaskEdit.EditText infinite loop

Original Reporter info from Mantis: marcou
  • Reporter name: Marcou Gilles

Description:

When a value is assigned to a MaskEdit using an EditText, it triggers an infinite loop.

Steps to reproduce:

Create a projet with a button that assigns a value to a MaskEdit component using the method EditText:

procedure TForm1.Button1Click(Sender: TObject);
begin
  MaskEdit1.EditText:='1';
end;

The EditMask is set to: 999999;1;_

Additional information:

The infinite loop is located in the file maskedit.pp at line 1143:

while Utf8Length(S) < FMaskLength do S := S + ClearChar(Utf8Length(S)+1)

It continuously calls the ClearChar function.

System details:

 Operating System: Ubuntu 20.10
 Kernel: Linux 5.8.0-41-generic
 Architecture: x86-64

Mantis conversion info:

  • Mantis ID: 38505
  • Version: 2.0.10
  • Fixed in revision: r64617 (#5aa0aac4), r64625 (#b82ead0c)
Assignee
Assign to
Time tracking