Skip to content

Commit

Permalink
Revert #6 as the real fix is the fix for #11
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanizag committed Feb 5, 2024
1 parent 00f6a75 commit dac7724
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bdos_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ fn read_record_in_buffer(env: &mut BdosEnvironment, fcb: &Fcb, record: u16) -> i
let mut os_file = fs::File::open(&paths[0])?;

let file_offset = record as u64 * RECORD_SIZE as u64;
if file_offset > os_file.metadata()?.len() {
if file_offset >= os_file.metadata()?.len() {
return Ok(1); // End of file
}

Expand Down

0 comments on commit dac7724

Please sign in to comment.