Fixed a few more instructions
authorLukas Krickl <lukas@krickl.dev>
Sun, 25 Feb 2024 17:31:26 +0000 (18:31 +0100)
committerLukas Krickl <lukas@krickl.dev>
Sun, 25 Feb 2024 17:31:26 +0000 (18:31 +0100)
src/uldas.c

index 4ca35337bedd7c22fc815e2adbec23857c4f98f7..ab81865db0345747d5b9fcfda29f00b2dba48416 100644 (file)
@@ -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++;