This commit is contained in:
gibbed 2015-06-02 10:01:06 -05:00
parent 065f0417f2
commit b402fb76e1
1 changed files with 4 additions and 2 deletions

View File

@ -152,7 +152,9 @@ int32_t format_core(PPCContext* ppc_context, FormatData& data, ArgList& args,
return count; return count;
} else if (c != '%') { } else if (c != '%') {
output: output:
data.put(c); if (!data.put(c)) {
return -1;
}
++count; ++count;
continue; continue;
} }
@ -585,7 +587,7 @@ int32_t format_core(PPCContext* ppc_context, FormatData& data, ArgList& args,
auto b = &prefix.buffer[0]; auto b = &prefix.buffer[0];
while (remaining-- > 0) { while (remaining-- > 0) {
if (!data.put(*b++)) { if (!data.put(*b++)) {
return false; return -1;
} }
} }
} }