pxt-arcade
pxt-arcade copied to clipboard
image.transposed() crashing on device with panic code 821
image.transposed() has a bug. Here is the code in image.cpp:
Image_ transposed(Image_ img) {
Image_ r = mkImage(img->height(), img->width(), img->bpp());
// this is quite slow
for (int i = 0; i < img->width(); ++i) {
for (int j = 0; j < img->height(); ++i) {
setCore(r, j, i, getCore(img, i, j));
}
}
return r;
}
Note that in the inner for loop it should be ++j
instead of ++i
This code crashes on a PyBadge.