1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-12-23 00:22:01 +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:
CTCaer 2024-01-06 21:52:48 +02:00
parent 92093ff08e
commit dab5eb9aa0

View file

@ -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 *));