From 91a93f360f06ac94220d4fcec7811ce85753be69 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sun, 25 Feb 2024 18:31:26 +0100 Subject: [PATCH] Fixed a few more instructions --- src/uldas.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/uldas.c b/src/uldas.c index 4ca3533..ab81865 100644 --- a/src/uldas.c +++ b/src/uldas.c @@ -72,6 +72,7 @@ int ulas_dasm_instr_check(FILE *src, FILE *dst, const struct ulas_instr *instr, dat = 0; } + // do we even have enough data? // this is a general check for 1 byte if (bi >= read) { @@ -93,7 +94,7 @@ int ulas_dasm_instr_check(FILE *src, FILE *dst, const struct ulas_instr *instr, bi += 2; break; default: - if (buf[bi] != dat) { + if ((buf[bi] & 0xFF) != (dat & 0xFF)) { goto fail; } bi++; -- 2.30.2