From d528679da50e1c9fd33459b7d2a5a64de16c783f Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Thu, 25 May 1989 11:48:20 +0000 Subject: [PATCH] Split copyright string. Added check for empty machine in dupmachine(). --- nfa.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/nfa.c b/nfa.c index d1c6f4e..d386037 100644 --- 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; -- 2.50.1