소스 검색

Fix `ImageDrawRectangleRec` (#3721)

pull/3727/head
Le Juez Victor 1 년 전
committed by GitHub
부모
커밋
746f129bfe
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      src/rtextures.c

+ 2
- 2
src/rtextures.c 파일 보기

@ -3562,8 +3562,8 @@ void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color)
if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0)) return;
// Security check to avoid drawing out of bounds in case of bad user data
if (rec.x < 0) { rec.width -= rec.x; rec.x = 0; }
if (rec.y < 0) { rec.height -= rec.y; rec.y = 0; }
if (rec.x < 0) { rec.width += rec.x; rec.x = 0; }
if (rec.y < 0) { rec.height += rec.y; rec.y = 0; }
if (rec.width < 0) rec.width = 0;
if (rec.height < 0) rec.height = 0;

불러오는 중...
취소
저장