Commit 69b07ee1 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(scan_sexps_forward): Use the initial depth

in the starting state for tracking when we reach TARGETDEPTH.
parent 2718dfa4
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment