Skip to content

Commit

Permalink
fix test failure on 32 bit windows
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk committed Nov 10, 2017
1 parent 6bf1547 commit 403a46a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion std/io.zig
Expand Up @@ -273,7 +273,9 @@ pub const File = struct {
else => os.unexpectedErrorWindows(err),
};
}
return @bitCast(usize, file_size);
if (file_size < 0)
return error.Overflow;
return math.cast(usize, u64(file_size));
} else {
unreachable;
}
Expand Down

0 comments on commit 403a46a

Please sign in to comment.