summaryrefslogtreecommitdiff
path: root/std/io.toc
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-07-13 19:01:37 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2020-07-13 19:01:37 -0400
commita1afddbf8843d01c93cad0735fce4417318a096e (patch)
tree462c2ef16087bb7ae1aa2dc8cee173631f1472b9 /std/io.toc
parenta12739cd3f2ae5c78eca04cb3a1b30243db4f4fe (diff)
started #for, also fixed some other stuff (including io.puti)
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;