Skip to content

Commit

Permalink
Fix io.read option
Browse files Browse the repository at this point in the history
  • Loading branch information
nagadomi committed Mar 1, 2017
1 parent 81a4de1 commit 780e22c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/image_loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 780e22c

Please sign in to comment.