commit a18f8697f0c6dcadc736db99c7ca5a4b09bbd565
parent 1b1c9fc7101257f377a9c690798ed03c91d14559
Author: neauoire <aliceffekt@gmail.com>
Date: Fri, 25 Aug 2023 13:05:45 -0700
(uxn.c) Removed unnecessary negation
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/devices/system.c b/src/devices/system.c
@@ -91,7 +91,8 @@ system_version(char *name, char *date)
}
void
-system_boot(Uxn *u, int soft){
+system_boot(Uxn *u, int soft)
+{
int i;
for(i = 0x100 * soft; i < 0x10000; i++)
u->ram[i] = 0;
diff --git a/src/uxn.c b/src/uxn.c
@@ -43,7 +43,7 @@ uxn_eval(Uxn *u, Uint16 pc)
k = ins & 0x80 ? 0xff : 0;
s = ins & 0x40 ? &u->rst : &u->wst;
ptr = s->dat + s->ptr - 1;
- switch(!(ins & 0x1f) ? (0 - (ins >> 5)) & 0xff : ins & 0x3f) {
+ switch(ins & 0x1f ? ins & 0x3f : (0 - (ins >> 5)) & 0xff) {
/* IMM */
case 0x00: /* BRK */ return 1;
case 0xff: /* JCI */ if(!s->dat[--s->ptr]) { pc += 2; break; } /* else fallthrough */