changeset 12870:1372454cb5e5

(scan_sexps_forward): Use the initial depth in the starting state for tracking when we reach TARGETDEPTH.
author Richard M. Stallman <rms@gnu.org>
date Wed, 16 Aug 1995 15:03:24 +0000
parents 2304fcfade47
children d998327b9011
files src/syntax.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/syntax.c	Wed Aug 16 15:00:57 1995 +0000
+++ b/src/syntax.c	Wed Aug 16 15:03:24 1995 +0000
@@ -1534,7 +1534,7 @@
 	    error ("Nesting too deep for parser");
 	  curlevel->prev = -1;
 	  curlevel->last = -1;
-	  if (!--targetdepth) goto done;
+	  if (targetdepth != depth) goto done;
 	  break;
 
 	case Sclose:
@@ -1544,7 +1544,7 @@
 	  if (curlevel != levelstart)
 	    curlevel--;
 	  curlevel->prev = curlevel->last;
-	  if (!++targetdepth) goto done;
+	  if (targetdepth != depth) goto done;
 	  break;
 
 	case Sstring: