diff --git a/pxt_modules/screen/image.cpp b/pxt_modules/screen/image.cpp index 1fb7b8b54..ec47f1dc6 100644 --- a/pxt_modules/screen/image.cpp +++ b/pxt_modules/screen/image.cpp @@ -502,7 +502,7 @@ void scroll(Image_ img, int dx, int dy) { } else if (dx < 0) { dx = -dx; if (dx < w) - memmove(img->pix(), img->pix(dx, 0), (w - dx) * bh); + memmove(img->pix(), img->pix(dx, 0), static_cast(w - dx) * static_cast(bh)); else dx = w; memset(img->pix(w - dx, 0), 0, dx * bh);