diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sword25/gfx/opengl/glimage.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sword25/gfx/opengl/glimage.cpp b/engines/sword25/gfx/opengl/glimage.cpp index 60b2686051..ec691d8b66 100644 --- a/engines/sword25/gfx/opengl/glimage.cpp +++ b/engines/sword25/gfx/opengl/glimage.cpp @@ -196,8 +196,8 @@ bool GLImage::Blit(int PosX, int PosY, int Flipping, Common::Rect *pPartRect, un PosY = 0; } - w = CLIP(w, 0, (int)_backSurface->w - PosX - 1); - h = CLIP(h, 0, (int)_backSurface->h - PosY - 1); + w = CLIP(w, 0, MAX((int)_backSurface->w - PosX - 1, 0)); + h = CLIP(h, 0, MAX((int)_backSurface->h - PosY - 1, 0)); if (w == 0 || h == 0) return true; |