From 82fea6cf8fc7a2a7534d01cf7a8021eb2353b1e8 Mon Sep 17 00:00:00 2001 From: CPunch Date: Thu, 15 Aug 2019 15:04:35 -0500 Subject: [PATCH] i'm an idiot wow i am so dumb --- luac.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luac.py b/luac.py index 0d05a8c..bb2ac81 100644 --- a/luac.py +++ b/luac.py @@ -47,7 +47,7 @@ def get_bits(num, p, k): kBitSubStr = binary[start : end] # convert extracted sub-string into decimal again - return (int(kBitSubStr,2) % 256) + return (int(kBitSubStr,2)) class LuaCompiler: def __init__(self): @@ -178,7 +178,7 @@ class LuaCompiler: elif instruction['TYPE'] == "ABx": instruction['Bx'] = get_bits(data, 15, 32) elif instruction['TYPE'] == "AsBx": - instruction['sBx'] = get_bits(data, 15, 32) #- 131071 + instruction['sBx'] = get_bits(data, 15, 32) - 131071 chunk['INSTRUCTIONS'][i] = instruction