s-regpat.adb (Parse_Character_Class): Fix handling of empty character classes ("[]").
2007-09-10 Emmanuel Briot <briot@adacore.com> * s-regpat.adb (Parse_Character_Class): Fix handling of empty character classes ("[]"). From-SVN: r128333
This commit is contained in:
parent
b5c84c3ccf
commit
36df551d43
@ -1457,6 +1457,10 @@ package body System.Regpat is
|
||||
elsif not In_Range then
|
||||
Last_Value := Value;
|
||||
|
||||
if Parse_Pos > Expression'Last then
|
||||
Fail ("Empty character class []");
|
||||
end if;
|
||||
|
||||
if Expression (Parse_Pos) = '-'
|
||||
and then Parse_Pos < Parse_End
|
||||
and then Expression (Parse_Pos + 1) /= ']'
|
||||
|
Loading…
Reference in New Issue
Block a user