]> granicus.if.org Git - re2c/commitdiff
Fix possible SEGV
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Wed, 12 May 2004 09:46:18 +0000 (09:46 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Wed, 12 May 2004 09:46:18 +0000 (09:46 +0000)
dfa.h

diff --git a/dfa.h b/dfa.h
index 6bd782482d1a47da639fd6701ba629553a0c3afb..9761e4e4ef019ad9dad75a27377f7fa364b96bef 100644 (file)
--- a/dfa.h
+++ b/dfa.h
@@ -145,7 +145,7 @@ inline bool Action::isMatch() const
        { return false; }
 
 inline bool Action::readAhead() const
-       { return !isMatch() || !state->next->action->isRule(); }
+       { return !isMatch() || (state && state->next && state->next->action && !state->next->action->isRule()); }
 
 inline Match::Match(State *s) : Action(s)
     { }