mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 15:39:14 +02:00
Masks: fix TMask.Matches() when converting the case alters UTF8Length Issue #0026790). Based on patch by laz-andy.
git-svn-id: trunk@46339 -
This commit is contained in:
parent
51ab663b7f
commit
1d7f7a7b0a
@ -289,7 +289,7 @@ var
|
||||
if fCaseSensitive then
|
||||
CharValue := GetCodePoint(AValue,I)
|
||||
else
|
||||
CharValue := Utf8UpperCase(GetCodePoint(AValue,I));
|
||||
CharValue := Utf8LowerCase(GetCodePoint(AValue,I));
|
||||
end;
|
||||
|
||||
Inc(FMask.MinLength);
|
||||
@ -374,6 +374,8 @@ var
|
||||
end;
|
||||
mcAnyChar:
|
||||
begin
|
||||
//CP := GetCodePoint(S, CharIndex);
|
||||
//writeln('mcAnyChar: CP = ',UTF8ToConsole(CP),' CharIndex = ',CharIndex);
|
||||
if CharIndex > L then Exit;
|
||||
Inc(CharIndex);
|
||||
end;
|
||||
@ -411,7 +413,10 @@ begin
|
||||
if fCaseSensitive then
|
||||
S := AFileName
|
||||
else
|
||||
S := Utf8UpperCase(AFileName);
|
||||
begin
|
||||
S := Utf8LowerCase(AFileName);
|
||||
L := Utf8Length(S);
|
||||
end;
|
||||
Result := MatchToEnd(0, 1);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user