Fix io.read option
This commit is contained in:
parent
81a4de1fa3
commit
780e22cf51
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue