Skip to content

Commit

Permalink
Fix a fencepost error when reading from the parse tree.
Browse files Browse the repository at this point in the history
  • Loading branch information
ianh committed Dec 13, 2024
1 parent 4213bbe commit c2be1d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/6a-generate.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ void generate(struct generator *gen)
output_line(out, " uint8_t *parse_tree = tree->parse_tree;");
output_line(out, " size_t parse_tree_size = tree->parse_tree_size;");
output_line(out, " size_t i = *offset;");
output_line(out, " if (i + RESERVATION_AMOUNT >= parse_tree_size)");
output_line(out, " if (i + RESERVATION_AMOUNT > parse_tree_size)");
output_line(out, " return 0;");
output_line(out, " uint64_t result = 0;");
output_line(out, " int shift_amount = 0;");
Expand Down

0 comments on commit c2be1d5

Please sign in to comment.