fix printing a char from an empty string
This commit is contained in:
parent
6886164e34
commit
4d5fb6c357
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue