lua_bitmap_composite: Don't OOB with outside if no right gap
commitdd9434bc360af96642325ce91a98d20a0c1cd2b4
authorIlari Liusvaara <ilariliusvaara@welho.com>
Sat, 31 Dec 2022 03:50:35 +0000 (31 05:50 +0200)
committerIlari Liusvaara <ilariliusvaara@welho.com>
Sat, 31 Dec 2022 03:50:35 +0000 (31 05:50 +0200)
treec17fe1f961e051cec134198ae8b900ddd10c19c6
parentff932df01cb7a7c6079d7b754f6c729b514d332a
lua_bitmap_composite: Don't OOB with outside if no right gap

If lua_bitmap_composite encountered a cut, it warped to the right
edge of the gap and then proceeded to composite a pixel. This is
incorrect, because the right edge can be beyond draw area, resulting
OOB access. Fix this by checking that the warped right edge is in
draw area, and if not, moving to next row.
include/lua/bitmap.hpp