Commit 403a46abcc

Andrew Kelley <superjoe30@gmail.com>
2017-11-10 22:03:14
fix test failure on 32 bit windows
1 parent 6bf1547
Changed files (1)
std
std/io.zig
@@ -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;
         }