mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-22 18:06:40 +00:00
bdk: sprintf: do not accept null chars
Skip NULL chars on putc since they break the resulted string.
This commit is contained in:
parent
92093ff08e
commit
dab5eb9aa0
1 changed files with 3 additions and 1 deletions
|
@ -112,7 +112,9 @@ void s_printf(char *out_buf, const char *fmt, ...)
|
||||||
switch (*fmt)
|
switch (*fmt)
|
||||||
{
|
{
|
||||||
case 'c':
|
case 'c':
|
||||||
_s_putc(va_arg(ap, u32));
|
char c = va_arg(ap, u32);
|
||||||
|
if (c != '\0')
|
||||||
|
_s_putc(c);
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
_s_puts(va_arg(ap, char *));
|
_s_puts(va_arg(ap, char *));
|
||||||
|
|
Loading…
Reference in a new issue