fix printing a char from an empty string

This commit is contained in:
ben 2016-04-28 12:07:24 -05:00
parent 6886164e34
commit 4d5fb6c357

View file

@ -961,8 +961,9 @@ int format(char **pbuf, int *pbufsize, char *s, Node *a) /* printf-like conversi
*p = '\0';
}
} else {
*p++ = getsval(x)[0];
*p = 0;
if((*p = getsval(x)[0]) != '\0')
p++;
*p = '\0';
}
break;
}