summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/Jump.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/Jump.zig b/core/Jump.zig
index d85ff75a..ccdb8fdc 100644
--- a/core/Jump.zig
+++ b/core/Jump.zig
@@ -205,11 +205,13 @@ pub fn trackJump(p: *Pardes) void {
// Two in a row the same (a closed one reopened beside its own,
// or the entry between them gone): one entry, one step; the same
// as the digest sees them (a text's `place` is bytes undefined).
- if (w > 0 and pardes.walk.eql(Loc, &v.jumps.list[w - 1], &kept)) {
+ // Compared where it is stored (w <= i: read already): a pointer
+ // to `kept` put it on the stack for every entry of every step.
+ v.jumps.list[w] = kept;
+ if (w > 0 and pardes.walk.eql(Loc, &v.jumps.list[w - 1], &v.jumps.list[w])) {
if (i == v.jumps.cur) cur = w - 1;
continue;
}
- v.jumps.list[w] = kept;
w += 1;
}
v.jumps.n = w;