Fixed Visual Studio warning 4389

This commit is contained in:
Sam Lantinga 2023-03-30 14:02:04 -07:00
parent d135daad5b
commit 0bd77a5b93
12 changed files with 19 additions and 18 deletions

View file

@ -1579,7 +1579,7 @@ static int GLES2_TexSubImage2D(GLES2_RenderData *data, GLenum target, GLint xoff
/* Reformat the texture data into a tightly packed array */
src_pitch = (size_t)width * bpp;
src = (Uint8 *)pixels;
if (pitch != src_pitch) {
if ((size_t)pitch != src_pitch) {
blob = (Uint8 *)SDL_malloc(src_pitch * height);
if (blob == NULL) {
return SDL_OutOfMemory();