mirror of
https://github.com/simon987/Much-Assembly-Required-Frontend.git
synced 2025-12-14 23:29:02 +00:00
Fixes #30
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user