From 5703774f48a81ac1d77e902b96d3e5c84a1476a7 Mon Sep 17 00:00:00 2001 From: Cuyler36 Date: Sat, 25 Nov 2023 13:03:38 -0500 Subject: [PATCH] Link libc64/sprintf.c --- config/dol_slices.yml | 4 ++-- include/libc64/sprintf.h | 2 ++ src/libc64/sprintf.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config/dol_slices.yml b/config/dol_slices.yml index 1332bffb..204379b0 100644 --- a/config/dol_slices.yml +++ b/config/dol_slices.yml @@ -80,8 +80,8 @@ libc64/qrand.c: .sdata: [0x80217de8, 0x80217df0] .sbss: [0x80218640, 0x80218648] .sdata2: [0x80219130, 0x80219138] -#libc64/sprintf.c: -# .text: [0x8005ce18, 0x8005cf08] +libc64/sprintf.c: + .text: [0x8005ce18, 0x8005cf08] #libc64/malloc.c: # .text: [0x8005cf08, 0x8005d01c] # .bss: [0x80206F30, 0x80206F60] diff --git a/include/libc64/sprintf.h b/include/libc64/sprintf.h index 34c9fc3a..855d2d20 100644 --- a/include/libc64/sprintf.h +++ b/include/libc64/sprintf.h @@ -1,6 +1,8 @@ #ifndef SPRINTF_H #define SPRINTF_H +#include "types.h" + s32 sprintf(char* dst, const char* fmt, ...); #endif \ No newline at end of file diff --git a/src/libc64/sprintf.c b/src/libc64/sprintf.c index c81ad969..535ed2ff 100644 --- a/src/libc64/sprintf.c +++ b/src/libc64/sprintf.c @@ -4,7 +4,7 @@ #include "_mem.h" -static void* proutPrintf(void* dst, const char* fmt, size_t size) { +static void* proutPrintf(void* dst, const char* fmt, int size) { return (void*)((u8*)memcpy(dst, fmt, size) + size); }