fix(developer): lm compiler handle missing line no in errors

Fixes #8443.

Will cherry-pick to stable-16.0.

The regex for matching error messages has an optional section for
the file/line detail (line 54):

```regex
^(?:(.+) \((\d+)\): )?<snip>
```

The code that parses the results did not account for this being
optional, which would cause a crash if the error message did not include
this information.
This commit is contained in:
Marc Durdin 2023-03-16 09:38:50 +07:00
parent 7af12c27f9
commit 9db4cf2379

View file

@ -61,7 +61,7 @@ begin
if m.Success then
begin
msgFilename := m.Groups[1].Value;
msgLine := StrToInt(m.Groups[2].Value);
msgLine := StrToIntDef(m.Groups[2].Value, 0);
msgType := m.Groups[3].Value;
msgCode := StrToInt('$'+m.Groups[4].Value);
msgText := m.Groups[5].Value;