summaryrefslogtreecommitdiff
path: root/std/io.toc
diff options
context:
space:
mode:
Diffstat (limited to 'std/io.toc')
-rw-r--r--std/io.toc2
1 files changed, 1 insertions, 1 deletions
diff --git a/std/io.toc b/std/io.toc
index 10ec1d3..15314c9 100644
--- a/std/io.toc
+++ b/std/io.toc
@@ -285,7 +285,7 @@ fwritei ::= fn(use f: &File, x: int) err : FileError {
*out = '-';
out += 1;
// get the absolute value of x in a u64. this complicated stuff is needed because -INT_MIN doesn't fit in a 64-bit signed integer
- x_unsigned = (x as u64) - 18446744073709551615 - 1;
+ x_unsigned = (18446744073709551615 - (x as u64)) + 1;
} else {
*out = '0';
out += 1;