зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
8eb8a45faf
Коммит
d709a4ea24
|
@ -1188,6 +1188,9 @@ static int dosprintf(SprintfState *ss, const PRUnichar *fmt, va_list ap)
|
||||||
static int
|
static int
|
||||||
StringStuff(SprintfState* ss, const PRUnichar* sp, PRUint32 len)
|
StringStuff(SprintfState* ss, const PRUnichar* sp, PRUint32 len)
|
||||||
{
|
{
|
||||||
|
if (*sp == '\0')
|
||||||
|
return 0;
|
||||||
|
|
||||||
ptrdiff_t off = ss->cur - ss->base;
|
ptrdiff_t off = ss->cur - ss->base;
|
||||||
|
|
||||||
nsAString* str = static_cast<nsAString*>(ss->stuffclosure);
|
nsAString* str = static_cast<nsAString*>(ss->stuffclosure);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче