This commit is contained in:
simon
2018-01-20 09:32:28 -05:00
parent 8f5e851b31
commit f3de9c4c74
3 changed files with 7 additions and 3 deletions

View File

@@ -230,6 +230,11 @@ function getOperandType(text, result) {
return OPERAND_MEM_REG;
}
}
//Remove either ONE '+' or ONE '-' else the operand is invalid
//Credit: https://github.com/KevinRamharak
expr = expr.replace(/[+-]/, '');
//Check for number
if (!isNaN(Number(expr)) && Number(expr) === Math.floor(Number(expr))) {
return OPERAND_MEM_REG;