1
0
Fork 0
mirror of synced 2024-05-16 19:02:21 +12:00

Fix io.read option

This commit is contained in:
nagadomi 2017-03-01 15:15:45 +09:00
parent 81a4de1fa3
commit 780e22cf51

View file

@ -137,7 +137,7 @@ function image_loader.load_float(file)
if not fp then
error(file .. ": failed to load image")
end
local buff = fp:read("*a")
local buff = fp:read("*all")
fp:close()
return image_loader.decode_float(buff)
end
@ -146,7 +146,7 @@ function image_loader.load_byte(file)
if not fp then
error(file .. ": failed to load image")
end
local buff = fp:read("*a")
local buff = fp:read("*all")
fp:close()
return image_loader.decode_byte(buff)
end