소스 검색

REVIEWED: Possible overflow #4206

pull/4213/head
Ray 1 년 전
부모
커밋
923f983719
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -1
      src/rlgl.h
  2. +2
    -1
      src/rtextures.c

+ 2
- 1
src/rlgl.h 파일 보기

@ -4993,7 +4993,8 @@ static int rlGetPixelDataSize(int width, int height, int format)
default: break;
}
dataSize = width*height*bpp/8; // Total data size in bytes
char bytesPerPixel = bpp/8;
dataSize = width*height*bytesPerPixel; // Total data size in bytes
// Most compressed formats works on 4x4 blocks,
// if texture is smaller, minimum dataSize is 8 or 16

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

@ -5403,7 +5403,8 @@ int GetPixelDataSize(int width, int height, int format)
default: break;
}
dataSize = width*height*bpp/8; // Total data size in bytes
char bytesPerPixel = bpp/8;
dataSize = width*height*bytesPerPixel; // Total data size in bytes
// Most compressed formats works on 4x4 blocks,
// if texture is smaller, minimum dataSize is 8 or 16

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