Bug 1341880 - do not emit trailing \0 in PrintfState; r=glandium

MozReview-Commit-ID: 2di7CsDCWLF
This commit is contained in:
Tom Tromey
2017-02-27 13:29:54 -07:00
parent 206e3922e6
commit b003a546ae
4 changed files with 8 additions and 16 deletions

View File

@@ -931,11 +931,6 @@ struct MOZ_STACK_CLASS PrintfAppend_CharT : public mozilla::PrintfTarget
return true;
}
// Printf sends us the final null terminator even though we don't want it
if (aStr[aLen - 1] == '\0') {
--aLen;
}
mString->AppendASCII(aStr, aLen);
return true;
}