bdk: sprintf: no support for lower case hex and base that is not 10/16

This commit is contained in:
CTCaer 2022-05-19 15:01:10 +03:00
parent 2c768db542
commit 429074293a

View file

@ -36,13 +36,14 @@ static void _s_puts(char *s)
static void _s_putn(u32 v, int base, char fill, int fcnt)
{
char buf[65];
static const char digits[] = "0123456789ABCDEFghijklmnopqrstuvwxyz";
static const char digits[] = "0123456789ABCDEF";
char *p;
char buf[65];
int c = fcnt;
bool negative = false;
if (base > 36)
if (base != 10 && base != 16)
return;
// Account for negative numbers.