Skip to content

Commit

Permalink
Fixed: Off by one error
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Sep 11, 2023
1 parent 061f415 commit 30cf711
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src-rust/src/structs/internal/locator_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl LocatorHeader {
fn initialize_remaining_space_as_headers(header: *mut LocatorHeader, mut remaining_bytes: u32) {
unsafe {
let mut current_header = header;
while remaining_bytes > LENGTH as u32 {
while remaining_bytes >= LENGTH as u32 {
let next_header = (current_header as *mut u8).add(LENGTH) as *mut LocatorHeader;
(*next_header).set_default_values();
(*current_header).next_locator_ptr = Unaligned::new(next_header);
Expand Down

0 comments on commit 30cf711

Please sign in to comment.