mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-10 00:45:47 -07:00
Fixes an issue on macOS Mojave that was patched in fa1c281e79.
The list of changes can be found under
build/premake/premake5/CHANGES.txt.
This was SVN commit r22021.
15 lines
328 B
Lua
15 lines
328 B
Lua
function source.empty(err)
|
|
return function()
|
|
return nil, err
|
|
end
|
|
end
|
|
|
|
function source.file(handle, io_err)
|
|
if handle then
|
|
return function()
|
|
local chunk = handle:read(20)
|
|
if not chunk then handle:close() end
|
|
return chunk
|
|
end
|
|
else return source.empty(io_err or "unable to open file") end
|
|
end
|