shithub: mc

Download patch

ref: e1a74a0d31d8aaac4528c821654cab5e9a1ef144
parent: 0c678f7b8a8ea747663cc0e6cc18c90fdb1aa470
author: Ori Bernstein <[email protected]>
date: Wed Jan 22 20:42:42 EST 2014

We don't want 64 bits of 1s, we want 32 bits of them.

--- a/libstd/bigint.myr
+++ b/libstd/bigint.myr
@@ -379,7 +379,7 @@
 		if qhat > 0xfffffffful || qhat * w > ((rhat << 32) + w)
 			qhat--
 			rhat += z
-			if rhat <= ~0
+			if rhat <= 0xfffffffful
 				goto divagain
 			;;
 		;;
@@ -493,7 +493,7 @@
 	-> trim(a)
 }
 
-/* logical shift right, zero fills */
+/* logical shift right, zero fills. sign remains untouched. */
 const bigshri = {a, s
 	var off, shift
 	var t, carry