From 9888dcba03c528ab438e911eaedbfc499f7feda7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Tue, 8 Aug 2023 04:22:10 +0200 Subject: [PATCH] DEVR: use bitwise OR to avoid C compiler (kencc) promoting types to int and doing other weird stuff --- src/uxn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uxn.c b/src/uxn.c index 5312aa3..18e4ba3 100644 --- a/src/uxn.c +++ b/src/uxn.c @@ -23,7 +23,7 @@ WITH REGARD TO THIS SOFTWARE. #define POP2(o) { if((tsp = *sp) <= 0x01) HALT(1) o = PEEK2(&s->dat[tsp - 2]); *sp = tsp - 2; } #define POPx(o) { if(m2) { POP2(o) } else { POP1(o) } } #define DEVW(p, y) { if(m2) { DEO(p, y >> 8) DEO((p + 1), y) } else { DEO(p, y) } } -#define DEVR(o, p) { if(m2) { o = ((DEI(p) << 8) + DEI(p + 1)); } else { o = DEI(p); } } +#define DEVR(o, p) { if(m2) { o = DEI(p) << 8 | DEI(p + 1); } else { o = DEI(p); } } int uxn_eval(Uxn *u, Uint16 pc)