Skip to content

Commit

Permalink
tests: fix PNG test memory leak (#1665)
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit-pierre authored Oct 12, 2023
1 parent 9110706 commit 29f8620
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions spec/unit/png_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ describe("Png module", function()
ok, re = Png.decodeFromFile(fn, 4)
assert.are.same(ok, true)
local bb2 = BB.new(re.width, re.height, BB.TYPE_BBRGB32, re.data)
bb2:setAllocated(1)
local c = bb2:getPixel(0, 0)
assert.are.same({0x80, 0x80, 0x80, 0}, {c.r, c.g, c.b, c.alpha})
c = bb2:getPixel(200, 200)
Expand Down

0 comments on commit 29f8620

Please sign in to comment.