diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2013-02-25 14:15:58 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2013-02-25 14:15:58 +0000 |
commit | 4b637d5b46c6b1bbe2f0ca8372866e939aae92a5 (patch) | |
tree | 26bc1772db10ff9ffd6b1d24a17510f4fe6cdb09 /examples/apps | |
parent | d4279d860fb89f8f72ccefab670e21884c1a34e0 (diff) | |
download | fpGUI-4b637d5b46c6b1bbe2f0ca8372866e939aae92a5.tar.xz |
regex: fixes uninitialized values.
Diffstat (limited to 'examples/apps')
-rw-r--r-- | examples/apps/ide/src/synregexpr.pas | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/examples/apps/ide/src/synregexpr.pas b/examples/apps/ide/src/synregexpr.pas index a634427e..636e2253 100644 --- a/examples/apps/ide/src/synregexpr.pas +++ b/examples/apps/ide/src/synregexpr.pas @@ -836,9 +836,11 @@ function RegExprSubExpressions (const ARegExpr : string; do inc (i); if i > Len then Result := -1 // unbalansed '(' - else - if TRegExpr.ParseModifiersStr (System.Copy (ARegExpr, i, i - i0), Modif) - then AExtendedSyntax := (Modif and MaskModX) <> 0; + else begin + Modif := 0; + if TRegExpr.ParseModifiersStr (System.Copy (ARegExpr, i, i - i0), Modif) then + AExtendedSyntax := (Modif and MaskModX) <> 0; + end; end else begin // subexpression starts ASubExprs.Add (''); // just reserve space @@ -1906,6 +1908,7 @@ function TRegExpr.ParsePiece (out flagp : integer) : PRegExprChar; end; begin + flagp := WORST; Result := ParseAtom (flags); if Result = nil then EXIT; @@ -3188,7 +3191,7 @@ function TRegExpr.MatchPrim (prog : PRegExprChar) : boolean; // If it could work, try it. if (nextch = #0) or (reginput^ = nextch) then begin {$IFDEF ComplexBraces} - System.Move (LoopStack, SavedLoopStack, SizeOf (LoopStack)); //###0.925 + System.Move (LoopStack, SavedLoopStack{%H-}, SizeOf (LoopStack)); //###0.925 SavedLoopStackIdx := LoopStackIdx; {$ENDIF} if MatchPrim (next) then begin |