git: 9front

Download patch

ref: 9b68833b2326ad78a16d3d09c747832ee7756787
parent: efad9bd7f98d83cddc27541167976b8e479508a4
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Dec 4 00:14:31 EST 2017

realemu: fix precedence bug in argconv() format routine (thanks dan cross)

--- a/sys/src/cmd/aux/realemu/fmt.c
+++ b/sys/src/cmd/aux/realemu/fmt.c
@@ -203,9 +203,10 @@
 		if(i->sreg != RDS)
 			p += sprint(p, "%cS:", "ECSDFG"[i->sreg - RES]);
 		if(a->atype == AOb || a->atype == AOv || (i->mod == 0 &&
-			(i->alen == 2 && i->rm == 6) ||
-			(i->alen == 4 && ((i->rm == 5) ||
-			(i->rm == 4 && i->index == 4 && i->base == 5))))){
+			((i->alen == 2 && i->rm == 6) ||
+			 (i->alen == 4 &&
+				((i->rm == 5) ||
+				 (i->rm == 4 && i->index == 4 && i->base == 5)))))){
 			p += sprint(p, "[%.*lux]", (int)i->alen*2, a->off);
 			break;
 		}
--