(scan_sexps_forward): Use the initial depth
in the starting state for tracking when we reach TARGETDEPTH.
This commit is contained in:
parent
2718dfa4b8
commit
69b07ee13a
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue