os.pullEvent fixed

This commit is contained in:
Ale32bit 2016-11-01 16:29:35 +01:00 committed by GitHub
parent 971b80cf45
commit a382ad4efb

View file

@ -1,5 +1,6 @@
local old = os.pullEvent os.oldPullEvent = os.pullEvent
os.pullEvent = os.pullEventRaw os.pullEvent = os.pullEventRaw
local function crash(err) local function crash(err)
if not sPhone then if not sPhone then
sPhone = { sPhone = {
@ -165,9 +166,6 @@ end
local tArgs = {...} local tArgs = {...}
os.oldPullEvent = os.pullEvent
os.pullEvent = os.pullEventRaw
local argData = { local argData = {
["-u"] = false, ["-u"] = false,
["-s"] = false, ["-s"] = false,
@ -191,7 +189,7 @@ if argData["-s"] then
runningOnStartup = true runningOnStartup = true
end end
os.pullEvent = old os.pullEvent = os.oldPullEvent
local ok, err = pcall(function() setfenv(loadstring(script),getfenv())() end) local ok, err = pcall(function() setfenv(loadstring(script),getfenv())() end)