зеркало из https://github.com/mozilla/pjs.git
small mod to handle hex conversion better
This commit is contained in:
Родитель
0c7e82ae37
Коммит
5396424248
|
@ -758,10 +758,11 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode,PRInt32 aRadix) const {
|
|||
result=-result;
|
||||
break;
|
||||
}
|
||||
else if('+'==theChar) { //stop in a good state if you see this...
|
||||
else if(('+'==theChar) || (' '==theChar)) { //stop in a good state if you see this...
|
||||
break;
|
||||
}
|
||||
else if(' '==theChar){ //stop in a good state if you see this...
|
||||
else if((('x'==theChar) || ('X'==theChar)) && (16==aRadix)) {
|
||||
//stop in a good state.
|
||||
break;
|
||||
}
|
||||
else{
|
||||
|
|
|
@ -758,10 +758,11 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode,PRInt32 aRadix) const {
|
|||
result=-result;
|
||||
break;
|
||||
}
|
||||
else if('+'==theChar) { //stop in a good state if you see this...
|
||||
else if(('+'==theChar) || (' '==theChar)) { //stop in a good state if you see this...
|
||||
break;
|
||||
}
|
||||
else if(' '==theChar){ //stop in a good state if you see this...
|
||||
else if((('x'==theChar) || ('X'==theChar)) && (16==aRadix)) {
|
||||
//stop in a good state.
|
||||
break;
|
||||
}
|
||||
else{
|
||||
|
|
|
@ -758,10 +758,11 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode,PRInt32 aRadix) const {
|
|||
result=-result;
|
||||
break;
|
||||
}
|
||||
else if('+'==theChar) { //stop in a good state if you see this...
|
||||
else if(('+'==theChar) || (' '==theChar)) { //stop in a good state if you see this...
|
||||
break;
|
||||
}
|
||||
else if(' '==theChar){ //stop in a good state if you see this...
|
||||
else if((('x'==theChar) || ('X'==theChar)) && (16==aRadix)) {
|
||||
//stop in a good state.
|
||||
break;
|
||||
}
|
||||
else{
|
||||
|
|
|
@ -758,10 +758,11 @@ PRInt32 nsString::ToInteger(PRInt32* aErrorCode,PRInt32 aRadix) const {
|
|||
result=-result;
|
||||
break;
|
||||
}
|
||||
else if('+'==theChar) { //stop in a good state if you see this...
|
||||
else if(('+'==theChar) || (' '==theChar)) { //stop in a good state if you see this...
|
||||
break;
|
||||
}
|
||||
else if(' '==theChar){ //stop in a good state if you see this...
|
||||
else if((('x'==theChar) || ('X'==theChar)) && (16==aRadix)) {
|
||||
//stop in a good state.
|
||||
break;
|
||||
}
|
||||
else{
|
||||
|
|
Загрузка…
Ссылка в новой задаче