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

This commit is contained in:
cinap_lenrek 2015-10-06 06:38:37 +02:00
parent 651b2a32be
commit 37d2856f55

View file

@ -76,9 +76,9 @@ getflag(char *s)
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: