shithub: riscv

Download patch

ref: 988d326f321c24b7546164841f410aa93516a49d
parent: 2fe2ffe8135f0dc76644d650a399bd877b3ee7f7
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Aug 16 15:29:16 EDT 2015

vc: word align automatics

theres code that assumes one can dereference a char[] buffer on the stack
as a long (ghostscript gxblend.c), so make sure all automatics on the stack
are word aligned. this is not strictrly neccesary, but avoids some
trouble with unportable code.

--- a/sys/src/cmd/vc/swt.c
+++ b/sys/src/cmd/vc/swt.c
@@ -587,6 +587,7 @@
 	case Aaut3:	/* total allign of automatic */
 		o = align(o, t, Ael1);
 		o = align(o, t, Ael2);
+		w = SZ_LONG;
 		break;
 	}
 	o = round(o, w);