We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc72f17 commit a58ecf7Copy full SHA for a58ecf7
lib/std/fs.zig
@@ -749,7 +749,9 @@ pub const IterableDir = struct {
749
}
750
751
752
- const dir_info: *w.FILE_BOTH_DIR_INFORMATION = @ptrCast(@alignCast(&self.buf[self.index]));
+ // 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]));
755
if (dir_info.NextEntryOffset != 0) {
756
self.index += dir_info.NextEntryOffset;
757
} else {
0 commit comments