@@ -5237,7 +5237,7 @@ static int rlGetPixelDataSize(int width, int height, int format)
52375237 {
52385238 int blockWidth = (width + 3 )/4 ;
52395239 int blockHeight = (height + 3 )/4 ;
5240- unsigned long long dataSizeBytes = blockWidth * blockHeight * 8 ;
5240+ unsigned long long dataSizeBytes = ( unsigned long long ) blockWidth * blockHeight * 8 ;
52415241 if (dataSizeBytes < INT_MAX ) dataSize = (int )dataSizeBytes ;
52425242
52435243 } break ;
@@ -5248,15 +5248,15 @@ static int rlGetPixelDataSize(int width, int height, int format)
52485248 {
52495249 int blockWidth = (width + 3 )/4 ;
52505250 int blockHeight = (height + 3 )/4 ;
5251- unsigned long long dataSizeBytes = blockWidth * blockHeight * 16 ;
5251+ unsigned long long dataSizeBytes = ( unsigned long long ) blockWidth * blockHeight * 16 ;
52525252 if (dataSizeBytes < INT_MAX ) dataSize = (int )dataSizeBytes ;
52535253
52545254 } break ;
52555255 case RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA : // 4 bytes per each 4x4 block
52565256 {
52575257 int blockWidth = (width + 3 )/4 ;
52585258 int blockHeight = (height + 3 )/4 ;
5259- unsigned long long dataSizeBytes = blockWidth * blockHeight * 4 ;
5259+ unsigned long long dataSizeBytes = ( unsigned long long ) blockWidth * blockHeight * 4 ;
52605260 if (dataSizeBytes < INT_MAX ) dataSize = (int )dataSizeBytes ;
52615261
52625262 } break ;
@@ -5267,7 +5267,7 @@ static int rlGetPixelDataSize(int width, int height, int format)
52675267 if ((format >= RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE ) &&
52685268 (format <= RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 ))
52695269 {
5270- unsigned long long dataSizeBytes = (width * height * bpp ) >> 3 ; // Get size in bytes (dividing by 8)
5270+ unsigned long long dataSizeBytes = (( unsigned long long ) width * height * bpp ) >> 3 ; // Get size in bytes (dividing by 8)
52715271 if (dataSizeBytes < INT_MAX ) dataSize = (int )dataSizeBytes ;
52725272 }
52735273
0 commit comments