Skip to content

Commit 403a46a

Browse files
committedNov 10, 2017
fix test failure on 32 bit windows
1 parent 6bf1547 commit 403a46a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎std/io.zig

+3-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,9 @@ pub const File = struct {
273273
else => os.unexpectedErrorWindows(err),
274274
};
275275
}
276-
return @bitCast(usize, file_size);
276+
if (file_size < 0)
277+
return error.Overflow;
278+
return math.cast(usize, u64(file_size));
277279
} else {
278280
unreachable;
279281
}

0 commit comments

Comments
 (0)
Please sign in to comment.