mirror of
https://github.com/CPunch/LuaPytecode.git
synced 2024-12-22 06:10:03 +00:00
i'm an idiot
wow i am so dumb
This commit is contained in:
parent
a6f1318373
commit
82fea6cf8f
4
luac.py
4
luac.py
@ -47,7 +47,7 @@ def get_bits(num, p, k):
|
|||||||
kBitSubStr = binary[start : end]
|
kBitSubStr = binary[start : end]
|
||||||
|
|
||||||
# convert extracted sub-string into decimal again
|
# convert extracted sub-string into decimal again
|
||||||
return (int(kBitSubStr,2) % 256)
|
return (int(kBitSubStr,2))
|
||||||
|
|
||||||
class LuaCompiler:
|
class LuaCompiler:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -178,7 +178,7 @@ class LuaCompiler:
|
|||||||
elif instruction['TYPE'] == "ABx":
|
elif instruction['TYPE'] == "ABx":
|
||||||
instruction['Bx'] = get_bits(data, 15, 32)
|
instruction['Bx'] = get_bits(data, 15, 32)
|
||||||
elif instruction['TYPE'] == "AsBx":
|
elif instruction['TYPE'] == "AsBx":
|
||||||
instruction['sBx'] = get_bits(data, 15, 32) #- 131071
|
instruction['sBx'] = get_bits(data, 15, 32) - 131071
|
||||||
|
|
||||||
chunk['INSTRUCTIONS'][i] = instruction
|
chunk['INSTRUCTIONS'][i] = instruction
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user