ref: 1a7acb7c8d47f0145351a90d1781ba6ad1d60cde
parent: 009bea0f5779e3c78d051a2fd6664dcea3c435b8
author: Ori Bernstein <[email protected]>
date: Thu Aug 16 09:55:24 EDT 2012
Work around signedness bugs.
--- a/fmt.myr
+++ b/fmt.myr
@@ -50,7 +50,7 @@
;;
'w':
(w_val, ap) = vanext(ap)
- n += intfmt(buf[n:], i_val castto(int64), 10)
+ n += intfmt(buf[n:], w_val castto(int64), 10)
;;
'i':
(i_val, ap) = vanext(ap)
@@ -58,7 +58,7 @@
;;
'l':
(l_val, ap) = vanext(ap)
- n += intfmt(buf[n:], i_val castto(int64), 10)
+ n += intfmt(buf[n:], l_val castto(int64), 10)
;;
'p':
(p_val, ap) = vanext(ap)
--- a/test.myr
+++ b/test.myr
@@ -63,6 +63,6 @@
r = std.mksrng(10)
for i = 0; i < 10; i++
- std.put("r[%i] = %i\n", i, std.rand32(r))
+ std.put("r[%i] = %l\n", i, std.rand32(r) castto(int64))
;;
}