From b402fb76e1860f943c0de3db21585abaeec5c244 Mon Sep 17 00:00:00 2001 From: gibbed Date: Tue, 2 Jun 2015 10:01:06 -0500 Subject: [PATCH] Oops. --- src/xenia/kernel/xboxkrnl_strings.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xenia/kernel/xboxkrnl_strings.cc b/src/xenia/kernel/xboxkrnl_strings.cc index 1116cb294..86a4af669 100644 --- a/src/xenia/kernel/xboxkrnl_strings.cc +++ b/src/xenia/kernel/xboxkrnl_strings.cc @@ -152,7 +152,9 @@ int32_t format_core(PPCContext* ppc_context, FormatData& data, ArgList& args, return count; } else if (c != '%') { output: - data.put(c); + if (!data.put(c)) { + return -1; + } ++count; continue; } @@ -585,7 +587,7 @@ int32_t format_core(PPCContext* ppc_context, FormatData& data, ArgList& args, auto b = &prefix.buffer[0]; while (remaining-- > 0) { if (!data.put(*b++)) { - return false; + return -1; } } }