Corrected a few expression parser changes that had adversely affected other debuggers (eg, PCx86)
This commit is contained in:
parent
09dc4dcb9a
commit
38f709bb7a
8 changed files with 78 additions and 76 deletions
|
|
@ -1083,7 +1083,7 @@ class Debugger extends Component
|
|||
/*
|
||||
* A feature of MACRO-10 is that any single-digit number is automatically interpreted as base-10.
|
||||
*/
|
||||
value = Str.parseInt(sValue, sValue.length > 1? this.nBase : 10);
|
||||
value = Str.parseInt(sValue, sValue.length > 1 || this.nBase > 10? this.nBase : 10);
|
||||
}
|
||||
}
|
||||
if (value != null) {
|
||||
|
|
|
|||
|
|
@ -148,10 +148,12 @@ class Str {
|
|||
* a right shift of -(35 - n) is required.
|
||||
*/
|
||||
var v, shift = 0;
|
||||
var match = s.match(/(-?[0-9]+)B([0-9]*)/);
|
||||
if (match) {
|
||||
s = match[1];
|
||||
shift = 35 - ((match[2] || 35) & 0xff);
|
||||
if (base <= 10) {
|
||||
var match = s.match(/(-?[0-9]+)B([0-9]*)/);
|
||||
if (match) {
|
||||
s = match[1];
|
||||
shift = 35 - ((match[2] || 35) & 0xff);
|
||||
}
|
||||
}
|
||||
if (Str.isValidInt(s, base) && !isNaN(v = parseInt(s, base))) {
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue