shithub: mc

Download patch

ref: b862b777b9a3efb3c3bb8e733906cc80d93736cc
parent: 32695d586d8af9becd6bdcb0448d204e382a1f02
author: Ori Bernstein <[email protected]>
date: Tue Sep 16 17:44:11 EDT 2014

Preserve sign in division/mod

    We were leaving the sign to whatever the arg came in with.

--- a/libstd/bigint.myr
+++ b/libstd/bigint.myr
@@ -419,6 +419,7 @@
 	bigfree(r)
 	slfree(a.dig)
 	a.dig = q.dig
+	a.sign = q.sign
 	free(q)
 	-> a
 }
@@ -429,6 +430,7 @@
 	bigfree(q)
 	slfree(a.dig)
 	a.dig = r.dig
+	a.sign = r.sign
 	free(r)
 	-> a
 }