shithub: mc

Download patch

ref: 9b864a2bc7fbdae40704708a6893e6f29ad48397
parent: bb49af4578c4a1f31beee9da6d868e859697d1bc
author: Ori Bernstein <[email protected]>
date: Tue Jan 29 04:15:54 EST 2019

Align slices correctly in vaenter.

--- a/lib/std/varargs.myr
+++ b/lib/std/varargs.myr
@@ -147,11 +147,18 @@
 	-> ((p : intptr) + k  : byte#)
 }
 
-const sliceptr = {p
+const sliceptr = {pp
+	var p
+
+	p = (pp : intptr)
+	p = (p + 0x7) & ~0x7
 	-> (p : byte##)#
 }
 
-const slicelen = {p
-	p = addp(p, sizeof(intptr))
+const slicelen = {pp
+	var p
+
+	p = (pp : intptr)
+	p = (p + 0xf) & ~0x7
 	-> (p : size#)#
 }