From da582e2eec658e59f017c1d4507221af1c87b656 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Sat, 20 Jun 2020 18:10:21 +0200 Subject: [PATCH] REVIEWED: ImageDraw() #1283 --- src/textures.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/textures.c b/src/textures.c index 1d759882d..279fa0a25 100644 --- a/src/textures.c +++ b/src/textures.c @@ -2553,7 +2553,7 @@ void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color srcRec.width += dstRec.x; dstRec.x = 0; } - else if ((dstRec.x + srcPtr->width) > dst->width) srcRec.width = dst->width - dstRec.x; + else if ((dstRec.x + srcRec.width) > dst->width) srcRec.width = dst->width - dstRec.x; if (dstRec.y < 0) { @@ -2561,7 +2561,7 @@ void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color srcRec.height += dstRec.y; dstRec.y = 0; } - else if ((dstRec.y + srcPtr->height) > dst->height) srcRec.height = dst->height - dstRec.y; + else if ((dstRec.y + srcRec.height) > dst->height) srcRec.height = dst->height - dstRec.y; if (dst->width < srcRec.width) srcRec.width = dst->width; if (dst->height < srcRec.height) srcRec.height = dst->height;