mirror of
https://github.com/d0k3/GodMode9.git
synced 2026-05-30 22:36:55 +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)
|
||||
else
|
||||
-- assuming this is a number...
|
||||
if self._seek >= self._size then
|
||||
return nil
|
||||
end
|
||||
local data = fs.read_file(self._filename, self._seek, v)
|
||||
self._seek = self._seek + string.len(data)
|
||||
table.insert(to_return, data)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user