commit ef0aee083f2b5ed77354c3a38ca7f38057320b4e
parent f68975f5c806a15c6f6910deb913339b67cd992d
Author: Luxferre <lux@ferre>
Date: Thu, 11 Aug 2022 11:55:32 +0300
fixed Q logic
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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 */