mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
prevent getting an outrageous index value, when a char is not found in a
given nsStr. broke XPInstall.
This commit is contained in:
parent
6542da1b5e
commit
19f3511bbb
@ -359,7 +359,7 @@ inline PRInt32 RFindChar1(const char* aDest,PRUint32 aLength,PRUint32 anOffset,c
|
||||
*/
|
||||
inline PRInt32 RFindChar2(const char* aDest,PRUint32 aLength,PRUint32 anOffset,const PRUnichar aChar,PRBool aIgnoreCase) {
|
||||
PRUnichar theCmpChar=(aIgnoreCase ? nsCRT::ToUpper(aChar) : aChar);
|
||||
PRUint32 theIndex=0;
|
||||
PRInt32 theIndex=0;
|
||||
for(theIndex=aLength-1;theIndex>=0;theIndex--){
|
||||
PRUnichar theChar=GetUnicharAt(aDest,theIndex);
|
||||
if(aIgnoreCase)
|
||||
|
Loading…
Reference in New Issue
Block a user