Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbabcock committed Dec 14, 2023
1 parent be97a2e commit 055096c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/text/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,11 @@ where
0
};

if depth - closes < 1 {
let new_depth = depth - closes;
if new_depth < 1 {
break;
}
depth = new_depth;

let has_open = contains_zero_byte(data ^ repeat_byte(b'{'));
let opens = if has_open {
Expand All @@ -483,7 +485,7 @@ where
0
};

depth += opens - closes;
depth += opens;
ptr = ptr.add(8);
}

Expand Down

0 comments on commit 055096c

Please sign in to comment.