mirror of
https://github.com/d0k3/GodMode9.git
synced 2026-05-31 06:46:56 +00:00
Lua io: file:read now returns nil when seek is at eof, to match original module
This commit is contained in:
parent
d6c537a626
commit
ab72328652
@ -143,6 +143,9 @@ function file:read(...)
|
|||||||
table.insert(to_return, data)
|
table.insert(to_return, data)
|
||||||
else
|
else
|
||||||
-- assuming this is a number...
|
-- assuming this is a number...
|
||||||
|
if self._seek >= self._size then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
local data = fs.read_file(self._filename, self._seek, v)
|
local data = fs.read_file(self._filename, self._seek, v)
|
||||||
self._seek = self._seek + string.len(data)
|
self._seek = self._seek + string.len(data)
|
||||||
table.insert(to_return, data)
|
table.insert(to_return, data)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user