mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-05 00:36:57 +00:00
GRAPHICS: Make setPixel assert in attempts to draw outside of the surface
Based on PR#5011 by phcoder. Expect some of your engines to fail during runtime, fix them.
This commit is contained in:
parent
c200890161
commit
9862969f69
@ -181,6 +181,7 @@ public:
|
||||
*/
|
||||
inline void setPixel(int x, int y, int pixel) {
|
||||
assert(format.bytesPerPixel > 0 && format.bytesPerPixel <= 4);
|
||||
assert(x >= 0 && x < w && y >= 0 && y < h);
|
||||
if (format.bytesPerPixel == 1)
|
||||
*((uint8 *)getBasePtr(x, y)) = pixel;
|
||||
else if (format.bytesPerPixel == 2)
|
||||
|
Loading…
Reference in New Issue
Block a user