Skip to content

Commit

Permalink
SDL_render_gles2: remove ineffective widening cast
Browse files Browse the repository at this point in the history
warning: either cast from 'int' to 'size_t' (aka 'unsigned long') is ineffective, or there is loss of precision before the conversion [bugprone-misplaced-widening-cast]
  • Loading branch information
1bsyl committed Oct 30, 2019
1 parent ce308a7 commit 9e509e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/render/opengles2/SDL_render_gles2.c
Expand Up @@ -1812,7 +1812,7 @@ GLES2_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
int status;

temp_pitch = rect->w * SDL_BYTESPERPIXEL(temp_format);
buflen = (size_t) (rect->h * temp_pitch);
buflen = rect->h * temp_pitch;
if (buflen == 0) {
return 0; /* nothing to do. */
}
Expand Down

0 comments on commit 9e509e4

Please sign in to comment.