fixed io closing files and stuff

This commit is contained in:
Izaya 2017-08-27 04:22:11 +10:00
parent 3c142e6e2a
commit 2c61a6150b

View File

@ -6,9 +6,12 @@ function io.open(n,m)
local h=fs.open(n,m)
if h and m:sub(1,1) == "w" then
bt=buffer.ucreate()
function bt.write(d)
function bt.write(_,d)
return fs.write(h,d)
end
function bt.close()
return fs.close(h)
end
return bt
elseif h and m:sub(1,1) == "r" then
bt = buffer.ucreate()