Skip to content

Commit

Permalink
Merge pull request kareltucek#92 from soraxas/patch-2
Browse files Browse the repository at this point in the history
Fixup "Add inequality checks for register"
  • Loading branch information
kareltucek authored Jan 21, 2022
2 parents 764ca7d + 666f9ac commit ce3708e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions right/src/macros.c
Original file line number Diff line number Diff line change
Expand Up @@ -1322,13 +1322,13 @@ static bool processIfRegEqCommand(bool negate, const char* arg1, const char *arg

static bool processIfRegInequalityCommand(bool greaterThan, const char* arg1, const char *argEnd)
{
int32_t *address = getReg(arg1, argEnd, NULL);
uint8_t address = parseNUM(arg1, argEnd);
uint8_t param = parseNUM(NextTok(arg1, argEnd), argEnd);
if (address) {
if (validReg(address)) {
if (greaterThan) {
return (*address) > param;
return regs[address] > param;
} else {
return (*address) < param;
return regs[address] < param;
}
} else {
return false;
Expand Down

0 comments on commit ce3708e

Please sign in to comment.