aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1995-08-16 15:03:24 +0000
committerRichard M. Stallman <[email protected]>1995-08-16 15:03:24 +0000
commit69b07ee13afaeda4b419f615c3e3ade5f7882c5f (patch)
tree8d232005b7a3ea1c79967a66a79f3bb535fd0455 /src
parent2718dfa4b84b569a7f03e42f257d984bd473fea6 (diff)
(scan_sexps_forward): Use the initial depth
in the starting state for tracking when we reach TARGETDEPTH.
Diffstat (limited to 'src')
-rw-r--r--src/syntax.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 8a97a936d3..ed482be484 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1534,7 +1534,7 @@ scan_sexps_forward (stateptr, from, end, targetdepth,
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 @@ scan_sexps_forward (stateptr, from, end, targetdepth,
if (curlevel != levelstart)
curlevel--;
curlevel->prev = curlevel->last;
- if (!++targetdepth) goto done;
+ if (targetdepth != depth) goto done;
break;
case Sstring: