In reference to bug # 12415
Added assertion ( per warrne's request ) to detect null char occasionally appearing in the input stream provided by necko R=pollmann
This commit is contained in:
Родитель
180c7c1ebd
Коммит
094354630f
|
@ -265,8 +265,9 @@ PRBool nsScanner::Append(const char* aBuffer, PRUint32 aLen){
|
|||
// it won't break UCS2 file
|
||||
// Hack Start
|
||||
for(PRInt32 i=0;i<unicharLength;i++)
|
||||
if(0x0000 == unichars[i])
|
||||
unichars[i] = 0x0020;
|
||||
NS_ASSERTION(0x0000 != unichars[i],"found a null character");
|
||||
//if(0x0000 == unichars[i])
|
||||
//unichars[i] = 0x0020;
|
||||
// Hack End
|
||||
|
||||
mBuffer.Append(unichars, unicharLength);
|
||||
|
|
|
@ -265,8 +265,9 @@ PRBool nsScanner::Append(const char* aBuffer, PRUint32 aLen){
|
|||
// it won't break UCS2 file
|
||||
// Hack Start
|
||||
for(PRInt32 i=0;i<unicharLength;i++)
|
||||
if(0x0000 == unichars[i])
|
||||
unichars[i] = 0x0020;
|
||||
NS_ASSERTION(0x0000 != unichars[i],"found a null character");
|
||||
//if(0x0000 == unichars[i])
|
||||
//unichars[i] = 0x0020;
|
||||
// Hack End
|
||||
|
||||
mBuffer.Append(unichars, unicharLength);
|
||||
|
|
Загрузка…
Ссылка в новой задаче