From 7f6b215311245e52454c01a538151c46d3c0e13b Mon Sep 17 00:00:00 2001 From: naru Date: Sun, 24 Aug 2003 19:25:27 +0000 Subject: [PATCH] Supress RegExp Error when the script is empty --- bottleclient/BottleChainRule.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bottleclient/BottleChainRule.pas b/bottleclient/BottleChainRule.pas index a7ca11f..0972c11 100755 --- a/bottleclient/BottleChainRule.pas +++ b/bottleclient/BottleChainRule.pas @@ -1318,7 +1318,10 @@ begin if not (Event is TBottleChainBottleEvent) then Exit; Dat := (Event as TBottleChainBottleEvent).Data; try - Result := RegExp.Match(Pattern, Dat['Script']); + if Dat['Script'] <> '' then + Result := RegExp.Match(Pattern, Dat['Script']) + else + Result := false; except on E: EBRegExpError do begin ShowMessage('³‹K•\Œ»ƒGƒ‰['#13#10#13#10 + E.Message); -- 2.11.0