fix printing negative numbers

This commit is contained in:
Elias Bennour 2023-12-03 14:29:07 +01:00
parent c16fe6349b
commit c900a0444f

View File

@ -63,7 +63,7 @@ void printProgram(struct program program) {
strcpy(c, "ERROR");
break;
}
IMMEDIATE(program.program[i]) ? printf("%03i:\t%s\t%i\n", i, c, IMMEDIATE(program.program[i])) : printf(
IMMEDIATE(program.program[i]) ? printf("%03i:\t%s\t%i\n", i, c, SIGN_EXTEND(IMMEDIATE(program.program[i]))) : printf(
"%03i:\t%s\n", i, c);
}
}