new version
authorTobias Girstmair <t@thi3nkpad.lan>
Mon, 12 Nov 2018 23:14:20 +0000 (00:14 +0100)
committerTobias Girstmair <t@thi3nkpad.lan>
Mon, 12 Nov 2018 23:14:20 +0000 (00:14 +0100)
foo.c

diff --git a/foo.c b/foo.c
index 01b1c207529550233350e6347dd5750d8bc02682..de8410b60a0f4db284152062d404fea1b77fde08 100644 (file)
--- a/foo.c
+++ b/foo.c
@@ -2,8 +2,11 @@
 #include "fakeasm.h"
 typedef unsigned char u8;
 
+u8* data = "Qj}6jQ6%BY}6YB6%";
 int g(int i, u8 x, u8 t, u8 o) {
-       u8 xxx = (3 & i >> 16 ? "BY}6YB6%" : "Qj}6jQ6%")[t & 0x7];
+       t = t & 0x7;
+       if (3 & i >> 16 ) t+=8;
+       u8 xxx = data[t];
        SUBI    (xxx, -51)
        xxx = (i*xxx) >> o;
        AND     (xxx, x)
Imprint / Impressum