]> granicus.if.org Git - flex/commitdiff
Split copyright string. Added check for empty machine in dupmachine().
authorVern Paxson <vern@ee.lbl.gov>
Thu, 25 May 1989 11:48:20 +0000 (11:48 +0000)
committerVern Paxson <vern@ee.lbl.gov>
Thu, 25 May 1989 11:48:20 +0000 (11:48 +0000)
nfa.c

diff --git a/nfa.c b/nfa.c
index d1c6f4ebbb9ba0903e7f157f1b097b0ab48cc66a..d386037ebb7f1b1ad6e3b4fe89c387f4fa2e3c57 100644 (file)
--- a/nfa.c
+++ b/nfa.c
@@ -27,8 +27,8 @@
 #ifndef lint
 
 static char copyright[] =
-    "@(#) Copyright (c) 1989 The Regents of the University of California.\n\
-     All rights reserved.\n";
+    "@(#) Copyright (c) 1989 The Regents of the University of California.\n";
+static char CR_continuation[] = "@(#) All rights reserved.\n";
 
 static char rcsid[] =
     "@(#) $Header$ (LBL)";
@@ -159,7 +159,9 @@ int dupmachine( mach )
 int mach;
 
     {
-    int i, state, init, last = lastst[mach], state_offset;
+    int i, init, state_offset;
+    int state = 0;
+    int last = lastst[mach];
 
     for ( i = firstst[mach]; i <= last; ++i )
        {
@@ -176,6 +178,9 @@ int mach;
        accptnum[state] = accptnum[i];
        }
 
+    if ( state == 0 )
+       flexfatal( "empty machine in dupmachine()" );
+
     state_offset = state - i + 1;
 
     init = mach + state_offset;