hekate/nyx: gfx: changes to putn

This commit is contained in:
CTCaer
2022-05-19 15:06:37 +03:00
parent bf00c79edb
commit 8428ce1a2e
4 changed files with 13 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2018 naehrwert
* Copyright (c) 2018-2021 CTCaer
* Copyright (c) 2018-2022 CTCaer
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -308,13 +308,14 @@ void gfx_puts(char *s)
static void _gfx_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.