diff options
Diffstat (limited to 'src/graphics/RasterDrawMethods.inl')
| -rw-r--r-- | src/graphics/RasterDrawMethods.inl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/graphics/RasterDrawMethods.inl b/src/graphics/RasterDrawMethods.inl index cce81d2..b5d52a9 100644 --- a/src/graphics/RasterDrawMethods.inl +++ b/src/graphics/RasterDrawMethods.inl @@ -329,8 +329,9 @@ void PIXELMETHODS_CLASS::clearrect(int x, int y, int w, int h) void PIXELMETHODS_CLASS::draw_image(pixel *img, int x, int y, int w, int h, int a) { int i, j, r, g, b; - if (!img || y >= VIDYRES) return; - if(y + h > VIDYRES) h = (VIDYRES)-y; //Adjust height to prevent drawing off the bottom + if (!img) return; + if(y + h > VIDYRES) h = ((VIDYRES)-y)-1; //Adjust height to prevent drawing off the bottom + if(!h || y < 0) return; if(a >= 255) for (j=0; j<h; j++) for (i=0; i<w; i++) |
