mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
small mod to handle hex conversion better
This commit is contained in:
parent
4ca272f218
commit
1fe259de63
@ -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{
|
||||
|
Loading…
Reference in New Issue
Block a user