fix test failure on 32 bit windows

This commit is contained in:
Andrew Kelley 2017-11-10 16:03:14 -05:00
parent 6bf1547148
commit 403a46abcc

View File

@ -273,7 +273,9 @@ pub const File = struct {
else => os.unexpectedErrorWindows(err), else => os.unexpectedErrorWindows(err),
}; };
} }
return @bitCast(usize, file_size); if (file_size < 0)
return error.Overflow;
return math.cast(usize, u64(file_size));
} else { } else {
unreachable; unreachable;
} }