Skip to content

Commit

Permalink
Wrap io.open into assert in buffer.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandlo committed Mar 16, 2024
1 parent 88f9cf5 commit 68b16a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/buffer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if #arg ~= 1 then
print("usage: luajit buffer.lua image-file")
error()
end
local f = io.open(arg[1], "rb")
local f = assert(io.open(arg[1], "rb"))
local content = f:read("*all")

local im = vips.Image.new_from_buffer(content, "", {access = "sequential"})
Expand Down

0 comments on commit 68b16a0

Please sign in to comment.