only: usability

This commit is contained in:
rusefillc 2024-05-10 13:55:24 -04:00
parent dd00d5dec5
commit 80a423bc36
1 changed files with 4 additions and 0 deletions

View File

@ -39,6 +39,10 @@ function getTwoBytesLSB(data, offset, factor)
end
function setTwoBytesLsb(data, offset, value)
if value > 1000000000 then
print(value .. " looks like NA EFI_LUA_LOOKUP missing?")
return
end
value = math.floor(value)
data[offset + 2] = value >> 8
data[offset + 1] = value & 0xff