From ef0aee083f2b5ed77354c3a38ca7f38057320b4e Mon Sep 17 00:00:00 2001 From: Luxferre Date: Thu, 11 Aug 2022 11:55:32 +0300 Subject: [PATCH] fixed Q logic --- equi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/equi.c b/equi.c index a7ab19f..d3dd08c 100644 --- a/equi.c +++ b/equi.c @@ -565,7 +565,7 @@ int main(int argc, char* argv[]) { } else if(!ram.II && (instr == 0xFFU || instr == INS_QUIT)) { /* if not in II mode, process EOF or Q instruction: trigger interpreter loop */ cputc(CR); /* echo CR */ cputc(LF); /* echo LF */ - ram.cmdbuf[+ram.ibp] = 0; /* end program with 0 */ + ram.cmdbuf[++ram.ibp] = INS_QUIT; /* end program with INS_QUIT */ ram.IM = 1; /* set the mandatory interpretation mode flag */ equi_main_loop(); /* and run the interpreter loop */ cputc(CR); /* echo CR */