Skip to content

Commit 717ab43

Browse files
authored
Update dir.rs
1 parent d2b4054 commit 717ab43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ pub const unsafe fn dirent_const_time_strlen(dirent: *const libc::dirent64) -> u
382382
let reclen = unsafe { (*dirent).d_reclen as usize};
383383
//find the record-length
384384
// THIS WILL ONLY WORK ON LITTLE-ENDIAN ARCHITECTURES, I CANT BE BOTHERED TO FIGURE THAT OUT, qemu isnt fun
385-
// Calculate the start of the d_name field
385+
// Calculate the start of the d_name field (the final word)
386386
let last_word = unsafe { *((dirent as *const u8).add(reclen - 8) as *const u64) };
387387
// Special case: When processing the 3rd u64 word (index 2), we need to mask
388388
// the non-name bytes (d_type and padding) to avoid false null detection.

0 commit comments

Comments
 (0)