clean up TERM value with floor for lua 5.3

This commit is contained in:
payonel 2017-05-14 16:57:32 -07:00
parent defe8c21dd
commit 6a634e018a

View File

@ -6,7 +6,7 @@ local function onComponentAvailable(_, componentType)
(componentType == "gpu" and component.isAvailable("screen"))
then
component.gpu.bind(component.screen.address)
local depth = 2^(component.gpu.getDepth())
local depth = math.floor(2^(component.gpu.getDepth()))
os.setenv("TERM", "term-"..depth.."color")
require("computer").pushSignal("gpu_bound", component.gpu.address, component.screen.address)
end