зеркало из https://github.com/mozilla/gecko-dev.git
better fix for #30646. r=mscott, a=jar.
This commit is contained in:
Родитель
daa66da4ed
Коммит
e92380a4a0
|
@ -1140,8 +1140,10 @@ mozTXTToHTMLConv::ScanTXT(const PRUnichar *text, PRUint32 whattodo,
|
|||
// need to reallocate and re-copy the characters already in the out String.
|
||||
NS_ASSERTION(inLength, "ScanTXT passed 0 length string");
|
||||
if (inLength == 0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
*_retval = nsCRT::strdup(text);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
outString.SetCapacity(inLength * growthRate);
|
||||
ScanTXT(text, inLength, whattodo, outString);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче