From c900a0444ff28416176895f6ccfe415358f9b70b Mon Sep 17 00:00:00 2001 From: Elias Bennour Date: Sun, 3 Dec 2023 14:29:07 +0100 Subject: [PATCH] fix printing negative numbers --- program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program.c b/program.c index 3a484dd..7da099f 100644 --- a/program.c +++ b/program.c @@ -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); } }