Fixed the missing return value 'r' in File:read.

This commit is contained in:
zhengying
2024-04-21 11:53:36 +08:00
parent 02a7b3005b
commit 231ddbca41

View File

@@ -117,7 +117,7 @@ function File:read(containerOrBytes, bytes)
if container == 'data' then
-- FileData from ByteData requires LÖVE 11.4+
local ok, fd = pcall(love.filesystem.newFileData, data, self._name)
if ok then return fd end
if ok then return fd, r end
end
local str = data:getString()