From af05a2979f97d00eab36261374af1eaf2ac3c833 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Tue, 27 Apr 2021 12:36:28 +0200 Subject: Add DMA control macros and small memory copy test --- src/text.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/text.h') diff --git a/src/text.h b/src/text.h index e38c220..c852fc2 100644 --- a/src/text.h +++ b/src/text.h @@ -2,6 +2,7 @@ #define GBAEXP_TILES_H #include +#include #include "common.h" #include "bd-font.c" @@ -75,11 +76,9 @@ txt_printf(char *msg, ...) { va_list arg_list; va_start(arg_list, msg); char c; - char prev_c; while ((c = *msg++) != '\0') { if (c != '%') { txt_putc(c); - prev_c = c; continue; } c = *msg++; @@ -88,19 +87,19 @@ txt_printf(char *msg, ...) { txt_puts(va_arg(arg_list, char *)); } break; case 'd': { - char buf[32] = {0}; + char buf[12] = {0}; int x = va_arg(arg_list, int); sprintf(buf, "%d", x); txt_puts(buf); } break; case 'u': { - char buf[32] = {0}; + char buf[12] = {0}; unsigned int x = va_arg(arg_list, unsigned int); sprintf(buf, "%u", x); txt_puts(buf); } break; case 'x': { - char buf[32] = {0}; + char buf[12] = {0}; unsigned int x = va_arg(arg_list, unsigned int); sprintf(buf, "%x", x); txt_puts(buf); -- cgit v1.2.1