AgonConsole8 / agon-vdp

Official Firmware for the Agon Console8: ESP32 VDP
MIT License
36 stars 12 forks source link

Copy rect crashes? #227

Open stevesims opened 1 month ago

stevesims commented 1 month ago

it appears that attempting to use the copy-rect PLOT call with out-of-bounds positioning can cause crashes

this should be verified, and code put in place inside vdp-gl to ensure that calling canvas->copyRect does not crash

behaviour for the PLOT call should be ensured to work the same as on Acorn systems

stevesims commented 1 month ago

genericCopyRect inside vdp-gl's displaycontroller.h, which implements this functionality, does have code in it that attempts to ensure that clipping is respected - however this logic only applies for destination coordinates, and not the source. it is therefore possible to set source coordinates that are out of bounds (i.e. not within the current frame buffer), which will cause a crash