fix ↑‿3⥊3
This commit is contained in:
parent
a3f87d4dcb
commit
68214dda53
@ -158,6 +158,14 @@ B shape_c2(B t, B w, B x) {
|
||||
}
|
||||
unit:
|
||||
|
||||
if (fill && nia>1) {
|
||||
MAKE_MUT(m, nia); mut_init(m, selfElType(x));
|
||||
mut_setG(m, 0, x);
|
||||
mut_fillG(m, 1, xf, nia-1);
|
||||
Arr* ra = mut_fp(m);
|
||||
arr_shSetU(ra, nr, sh);
|
||||
return withFill(taga(ra), xf);
|
||||
}
|
||||
if (isF64(x)) { decA(xf);
|
||||
i32 n = (i32)x.f;
|
||||
if (n == x.f) {
|
||||
|
||||
2
src/h.h
2
src/h.h
@ -532,7 +532,7 @@ static u8 fillElType(B x) {
|
||||
if (isC32(x)) return el_c32;
|
||||
return el_B;
|
||||
}
|
||||
static u8 selfElType(B x) {
|
||||
static u8 selfElType(B x) { // guaranteed to fit fill
|
||||
if (isF64(x)) return q_i32(x)? el_i32 : el_f64;
|
||||
if (isC32(x)) return el_c32;
|
||||
return el_B;
|
||||
|
||||
@ -192,7 +192,7 @@ static void mut_fill(Mut* m, usz ms, B x, usz l) {
|
||||
mut_to(m, nty);
|
||||
goto again;
|
||||
}
|
||||
static void mut_fillG(Mut* m, usz ms, B x, usz l) {
|
||||
static void mut_fillG(Mut* m, usz ms, B x, usz l) { // doesn't consume x
|
||||
switch(m->type) { default: UD;
|
||||
case el_i32: {
|
||||
assert(q_i32(x));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user