Bug 323376 - nsTextFormatter::ssprintf adds extra '\0' to result; Patch by Steve Krulewitz, updated by Jonathan Protzenko; r=darin approval2.0=beltzner

This commit is contained in:
Steve Krulewitz 2010-10-21 11:56:33 +01:00
parent bd9a9cf2a9
commit e157dd74d7

View File

@ -1188,6 +1188,9 @@ static int dosprintf(SprintfState *ss, const PRUnichar *fmt, va_list ap)
static int
StringStuff(SprintfState* ss, const PRUnichar* sp, PRUint32 len)
{
if (*sp == '\0')
return 0;
ptrdiff_t off = ss->cur - ss->base;
nsAString* str = static_cast<nsAString*>(ss->stuffclosure);