From 16b0c936d435125f2c0b6b0e44119d8fbf81c34a Mon Sep 17 00:00:00 2001 From: gibbed Date: Wed, 16 Oct 2013 19:04:23 -0700 Subject: [PATCH] Fixed argument size handling in _vsnprintf_shim, like DbgPrint_shim. --- src/xenia/kernel/modules/xboxkrnl/xboxkrnl_rtl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xenia/kernel/modules/xboxkrnl/xboxkrnl_rtl.cc b/src/xenia/kernel/modules/xboxkrnl/xboxkrnl_rtl.cc index 8769c4348..d4b607a07 100644 --- a/src/xenia/kernel/modules/xboxkrnl/xboxkrnl_rtl.cc +++ b/src/xenia/kernel/modules/xboxkrnl/xboxkrnl_rtl.cc @@ -441,7 +441,7 @@ SHIM_CALL _vsnprintf_shim( } // get length - int arg_size = 0; + int arg_size = 4; if (*end == 'h') { ++end; @@ -529,7 +529,7 @@ SHIM_CALL _vsnprintf_shim( local[0] = '\0'; strncat(local, start, end + 1 - start); - XEASSERT(arg_size == 0); + XEASSERT(arg_size == 4); if (arg_extras == 0) { uint32_t value = (uint32_t)SHIM_MEM_64(arg_ptr + (arg_index * 8)); // TODO: check if this is correct... const char *pointer = (const char *)SHIM_MEM_ADDR(value);