shithub: riscv

Download patch

ref: 98a5fc6535a10e292f0fa1ad5aed7f10a963ce19
parent: 2cfc72db7631a1416a9b983a38470584cc9407ac
author: aiju <devnull@localhost>
date: Thu May 3 10:06:15 EDT 2018

pc(1): always allocate at least one mpdigit (itomp assumes this)

--- a/sys/src/cmd/pc.y
+++ b/sys/src/cmd/pc.y
@@ -55,7 +55,7 @@
 	
 	r = emalloc(sizeof(Num));
 	r->ref = 1;
-	r->p = emalloc(0);
+	r->p = emalloc(sizeof(mpdigit));
 	mpassign(mpzero, r);
 	return r;
 }