Resolved PR comments

Explicitly declared i in loop,
handled result === undefined,
removed unnecessary empty string initialization.
This commit is contained in:
jacquej96 2019-10-16 08:25:01 -04:00 committed by GitHub
parent 7667cbfe0d
commit 080266ac4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,7 +176,9 @@ function parseDWInstruction(line, result, currentLine) {
}
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]) {
return true;
}
@ -201,7 +203,7 @@ function isRegisterOp(text) {
function getOffsetOperandType(text) {
var offset = "";
var offset;
if (isRegisterOp(text.substring(0, 2))) {
offset = text.substring(2);
} else if (isRegisterOp(text.substring(0, 1))) {