mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-18 02:06:43 +00:00
Resolved PR comments
Explicitly declared i in loop, handled result === undefined, removed unnecessary empty string initialization.
This commit is contained in:
parent
7667cbfe0d
commit
080266ac4a
@ -176,7 +176,9 @@ function parseDWInstruction(line, result, currentLine) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isLabel(text, result) {
|
function isLabel(text, result) {
|
||||||
for (i = 0; i < result.labels.length; i++) {
|
if (result === undefined) { return false; }
|
||||||
|
|
||||||
|
for (var i = 0; i < result.labels.length; i++) {
|
||||||
if (text === result.labels[i]) {
|
if (text === result.labels[i]) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -201,7 +203,7 @@ function isRegisterOp(text) {
|
|||||||
|
|
||||||
function getOffsetOperandType(text) {
|
function getOffsetOperandType(text) {
|
||||||
|
|
||||||
var offset = "";
|
var offset;
|
||||||
if (isRegisterOp(text.substring(0, 2))) {
|
if (isRegisterOp(text.substring(0, 2))) {
|
||||||
offset = text.substring(2);
|
offset = text.substring(2);
|
||||||
} else if (isRegisterOp(text.substring(0, 1))) {
|
} else if (isRegisterOp(text.substring(0, 1))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user