xworld, pdbox: Fix issues with using strncpy

Change-Id: Iaed18b7c856b7febef443d1e3e5f6b527b32ecae
This commit is contained in:
Solomon Peachy 2026-05-15 10:34:44 -04:00
parent a977c19338
commit f774de61b6
2 changed files with 5 additions and 0 deletions

View file

@ -160,6 +160,9 @@ void pd_init(void);
#undef strncat
#define strncat rb_strncat
#undef strncpy
#define strncpy rb->strncpy
//#ifndef SIMULATOR
/*FIXME: is it a correct replacement??? */
/* #if !(CONFIG_PLATFORM & PLATFORM_HOSTED) */

View file

@ -306,6 +306,8 @@ void engine_processInput(struct Engine* e) {
}
}
#undef strncpy
void engine_makeGameStateName(struct Engine* e, uint8_t slot, char *buf, int sz) {
(void) e;
rb->snprintf(buf, sz, "xworld_save.s%02d", slot);