more shcpy

This commit is contained in:
dzaima 2022-05-30 17:53:54 +03:00
parent 3455bed3ee
commit cb1338951c
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ B select_c1(B t, B x) {
usz ia = shProd(a(x)->sh, 1, xr);
Arr* r = TI(x,slice)(inc(x), 0, ia);
usz* sh = arr_shAlloc(r, xr-1);
if (sh) for (i32 i = 1; i < xr; i++) sh[i-1] = a(x)->sh[i];
if (sh) shcpy(sh, a(x)->sh+1, xr-1);
decG(x);
return taga(r);
}

View File

@ -716,7 +716,7 @@ B take_c2(B t, B w, B x) {
} else {
usz* rsh = arr_shAlloc(a, xr); // xr>1, don't have to worry about 0
rsh[0] = wv<0?-wv:wv;
for (i32 i = 1; i < xr; i++) rsh[i] = xsh[i];
shcpy(rsh+1, xsh+1, xr-1);
ptr_dec(shObjS(xsh));
}
return taga(a);