diff options
author | Alec Murphy <alec@checksum.fail> | 2021-07-05 11:40:33 -0400 |
---|---|---|
committer | Alec Murphy <alec@checksum.fail> | 2021-07-05 11:40:33 -0400 |
commit | 50525051e76fc35d3a01771d541d7e78525c05c5 (patch) | |
tree | f3356f81558aced8aab24d9c643689f961daf5ea | |
parent | cafdacdfad8ae8a1250ee61668060af6a3699e8f (diff) |
Fix vsnprintf so level clear doesn't crash
-rw-r--r-- | Lib/LibC.HC | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/LibC.HC b/Lib/LibC.HC index 8d63a88..d2d314c 100644 --- a/Lib/LibC.HC +++ b/Lib/LibC.HC @@ -715,14 +715,16 @@ U0 vsnprintf() { va_list *ap = p3; U64 va_ptr = ap->reg_save_area; U64 va_ptr2; + U64 va_ptr3; va_ptr += ap->gp_offset; va_ptr2 = va_ptr + 8; + va_ptr3 = va_ptr2 + 8; if (StrFind("STCFN", p2) || debug.counter > 1646600) { //"string: %s\n", p2; // PressAKey; } convert_format_string(p2); - StrPrint(p0, p2, *va_ptr(U64 *), *va_ptr2(U64 *)); + StrPrint(p0, p2, *va_ptr(U64 *), *va_ptr2(U64 *), *va_ptr3(U64 *)); POP_SYSV_REGS }
\ No newline at end of file |