mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 12:29:24 +02:00
LazUtils: Masks: an empty negated set is also an empty set, so don't allow that as well.
This commit is contained in:
parent
20f3e55048
commit
0a32776e98
@ -785,7 +785,7 @@ begin
|
|||||||
fLastOC:=TMaskParsedCode.Range;
|
fLastOC:=TMaskParsedCode.Range;
|
||||||
|
|
||||||
end else if fMask[fMaskInd]=']' then begin
|
end else if fMask[fMaskInd]=']' then begin
|
||||||
if fLastOC=TMaskParsedCode.CharsGroupBegin then
|
if (fLastOC=TMaskParsedCode.CharsGroupBegin) or (fLastOC=TMaskParsedCode.Negate) then
|
||||||
Exception_InvalidCharMask(fMask[fMaskInd],fMaskInd); //Error empty match
|
Exception_InvalidCharMask(fMask[fMaskInd],fMaskInd); //Error empty match
|
||||||
// Insert the new offset in case of a positive match in CharsGroup
|
// Insert the new offset in case of a positive match in CharsGroup
|
||||||
PInteger(@fMaskCompiled[lCharsGroupInsertSize])^:=fMaskCompiledIndex;
|
PInteger(@fMaskCompiled[lCharsGroupInsertSize])^:=fMaskCompiledIndex;
|
||||||
|
Loading…
Reference in New Issue
Block a user