| ... | @@ -749,7 +749,9 @@ pub const IterableDir = struct { | ... | @@ -749,7 +749,9 @@ pub const IterableDir = struct { |
| 749 | } | 749 | } |
| 750 | } | 750 | } |
| 751 | | 751 | |
| 752 | const dir_info: *w.FILE_BOTH_DIR_INFORMATION = @ptrCast(@alignCast(&self.buf[self.index])); | 752 | // While the official api docs guarantee FILE_BOTH_DIR_INFORMATION to be aligned properly |
| | 753 | // this may not always be the case (e.g. due to faulty VM/Sandboxing tools) |
| | 754 | const dir_info: *align(2) w.FILE_BOTH_DIR_INFORMATION = @ptrCast(@alignCast(&self.buf[self.index])); |
| 753 | if (dir_info.NextEntryOffset != 0) { | 755 | if (dir_info.NextEntryOffset != 0) { |
| 754 | self.index += dir_info.NextEntryOffset; | 756 | self.index += dir_info.NextEntryOffset; |
| 755 | } else { | 757 | } else { |