shithub: riscv

Download patch

ref: 37d2856f55ba62fec04481b87ee607c4ef8f2c45
parent: 651b2a32be9a0d0daebe9f6ff4ddee675908a8fc
author: cinap_lenrek <[email protected]>
date: Tue Oct 6 02:38:37 EDT 2015

cc: getflag() fmt will be terminated at end of loop (from charles forsyth)

--- a/sys/src/cmd/cc/dpchk.c
+++ b/sys/src/cmd/cc/dpchk.c
@@ -76,9 +76,9 @@
 	nstar = 0;
 	while(fmt < e){
 		s += chartorune(&c, s);
-		fmt += runetochar(fmt, &c);
 		if(c == 0 || c >= nelem(flagbits))
 			break;
+		fmt += runetochar(fmt, &c);
 		f = flagbits[c];
 		switch(f) {
 		case Fnone: