From 718561744c87df0866b34bcf64b216d507bd4471 Mon Sep 17 00:00:00 2001 From: Stefan Arentz Date: Mon, 26 Dec 2016 21:59:46 -0500 Subject: [PATCH] Quick fix for cpu tests to correctly recognize errors --- src/cpu_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu_test.c b/src/cpu_test.c index 407d7eb..640fe4c 100644 --- a/src/cpu_test.c +++ b/src/cpu_test.c @@ -38,7 +38,7 @@ int test(int model, uint16_t start_addr, uint16_t success_addr, char *rom_path) while (true) { int ret = cpu_step(&cpu); - if (ret != 0) { + if (ret < 0) { switch (ret) { case EWM_CPU_ERR_UNIMPLEMENTED_INSTRUCTION: fprintf(stderr, "TEST Unimplemented instruction 0x%.2x at 0x%.4x\n",