Fix pointer arithmetic bug where MSVC rejects the code

This commit is contained in:
Michael Martin
2019-09-21 00:41:49 -07:00
parent f973106448
commit 6f63db2c3d
+1 -1
View File
@@ -276,7 +276,7 @@ TFB_SDL2_UpdateTexture (SDL_Texture *dest, SDL_Surface *src, SDL_Rect *rect)
r = &backup;
}
/* SDL2 screen surfaces are always 32bpp */
srcBytes = src->pixels + (src->pitch * r->y) + (r->x * 4);
srcBytes = (char *)src->pixels + (src->pitch * r->y) + (r->x * 4);
destBytes = pixels;
rowsize = r->w * 4;
for (row = 0; row < r->h; ++row)