diff options
| author | Timon Kruiper <timonkruiper@gmail.com> | 2020-10-06 12:08:12 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-10-06 23:39:58 -0700 |
| commit | bd7eab573a5e5f1366cd5dc3639fef28c4acb32a (patch) | |
| tree | f1f6a4363781197db451e072ea7650595032bc6c /src/main.zig | |
| parent | fb63a2cfaecb981010e0b9d656fd372dbb331888 (diff) | |
| download | zig-bd7eab573a5e5f1366cd5dc3639fef28c4acb32a.tar.gz zig-bd7eab573a5e5f1366cd5dc3639fef28c4acb32a.zip | |
Fix building the zig compiler for 32-bit targets
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig index 7564342739..0b75d479d8 100644 --- a/src/main.zig +++ b/src/main.zig @@ -2541,7 +2541,7 @@ fn fmtPathFile( check_mode: bool, dir: fs.Dir, sub_path: []const u8, -) FmtError!void { +) (FmtError || error{Overflow})!void { const source_file = try dir.openFile(sub_path, .{}); var file_closed = false; errdefer if (!file_closed) source_file.close(); @@ -2554,7 +2554,7 @@ fn fmtPathFile( const source_code = source_file.readToEndAllocOptions( fmt.gpa, max_src_size, - stat.size, + try std.math.cast(usize, stat.size), @alignOf(u8), null, ) catch |err| switch (err) { |
