mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 03:11:16 +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)
|
||||
{
|
||||
case 'c':
|
||||
_s_putc(va_arg(ap, u32));
|
||||
char c = va_arg(ap, u32);
|
||||
if (c != '\0')
|
||||
_s_putc(c);
|
||||
break;
|
||||
case 's':
|
||||
_s_puts(va_arg(ap, char *));
|
||||
|
|
Loading…
Reference in a new issue