зеркало из https://github.com/mozilla/pjs.git
dummy
This commit is contained in:
Родитель
7a0ada6e35
Коммит
1c74a6ee7b
|
@ -80,8 +80,12 @@ NS_IMETHODIMP nsBasicStreamGenerator::GetByte(PRUint32 offset, PRUint8 *retval)
|
||||||
nsAllocator::Free(aPassword);
|
nsAllocator::Free(aPassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the offset byte from the stream. Our stream is
|
// Get the offset byte from the stream. Our stream is just our password
|
||||||
// just our password repeating itself infinite times.
|
// repeating itself infinite times.
|
||||||
*retval = mPassword[offset % mPassword.Length()];
|
//
|
||||||
|
// mPassword being a nsCString, returns a PRUnichar for operator [].
|
||||||
|
// Hence convert it to a const char * first before applying op [].
|
||||||
|
*retval = ((const char *)mPassword)[offset % mPassword.Length()];
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче