fix incorrect errors when using an integer format ImageData

This commit is contained in:
Sasha Szpakowski
2024-04-18 20:32:21 -03:00
parent 3a672387e4
commit 58f05eb000
+3 -3
View File
@@ -342,9 +342,9 @@ local objectcache = setmetatable({}, {
width = width,
height = height,
format = format,
pointer = conv == nil and nil or ffi.cast(conv.pointer, imagedata:getFFIPointer()),
tolua = conv == nil and nil or conv.tolua,
fromlua = conv == nil and nil or conv.fromlua,
pointer = conv ~= nil and ffi.cast(conv.pointer, imagedata:getFFIPointer()) or nil,
tolua = conv ~= nil and conv.tolua or nil,
fromlua = conv ~= nil and conv.fromlua or nil,
}
self[imagedata] = p