initialize shape properly in one case of high-rank take/drop

fixes 0‿4↑↕4 in debug builds, which just magically approximately worked before
This commit is contained in:
dzaima 2022-12-26 16:02:13 +02:00
parent f6b00f97ee
commit 7bcee07489

View File

@ -500,8 +500,9 @@ static NOINLINE B takedrop_highrank(bool take, B w, B x) {
decShObj(rsh);
} else {
Arr* ra = TI(x,slice)(x,0,IA(x));
PLAINLOOP for (usz i = 0; i < rr-xr; i++) rsh->a[i] = 1;
arr_shSetU(ra, rr, rsh);
x = taga(ra);
x = VALIDATE(taga(ra));
}
if (cellStart==-1) { // printf("equal shape\n");
r = x;