mirror of
https://github.com/raysan5/raylib.git
synced 2026-06-28 21:01:23 +08:00
REVIEWED: Possible overflow #4206
Some checks are pending
Android / build (arm64) (push) Waiting to run
Android / build (x86_64) (push) Waiting to run
CMakeBuilds / Windows Build (push) Waiting to run
CMakeBuilds / Linux Build (push) Waiting to run
Linux / build (i386, i386, /user/bin, 32) (push) Waiting to run
Linux / build (x86_64, amd64, /user/bin, 64) (push) Waiting to run
Linux Examples / build (push) Waiting to run
macOS / build (push) Waiting to run
WebAssembly / build (push) Waiting to run
Windows / build (i686, pe-i386, 32, mingw-w64) (push) Waiting to run
Windows / build (x64, x64, 64, msvc16) (push) Waiting to run
Windows / build (x86, Win32, 32, msvc16) (push) Waiting to run
Windows / build (x86_64, pe-x86-64, 64, mingw-w64) (push) Waiting to run
Windows Examples / build (push) Waiting to run
Some checks are pending
Android / build (arm64) (push) Waiting to run
Android / build (x86_64) (push) Waiting to run
CMakeBuilds / Windows Build (push) Waiting to run
CMakeBuilds / Linux Build (push) Waiting to run
Linux / build (i386, i386, /user/bin, 32) (push) Waiting to run
Linux / build (x86_64, amd64, /user/bin, 64) (push) Waiting to run
Linux Examples / build (push) Waiting to run
macOS / build (push) Waiting to run
WebAssembly / build (push) Waiting to run
Windows / build (i686, pe-i386, 32, mingw-w64) (push) Waiting to run
Windows / build (x64, x64, 64, msvc16) (push) Waiting to run
Windows / build (x86, Win32, 32, msvc16) (push) Waiting to run
Windows / build (x86_64, pe-x86-64, 64, mingw-w64) (push) Waiting to run
Windows Examples / build (push) Waiting to run
This commit is contained in:
parent
b657001e0d
commit
923f983719
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user