fix 𝕨⥊𝕩 integer overflow

This commit is contained in:
dzaima 2025-05-28 06:41:49 +03:00
parent 054cdac6d9
commit 879a3e2007
2 changed files with 3 additions and 0 deletions

View File

@ -320,6 +320,7 @@ B shape_c2(B t, B w, B x) {
return withFill(taga(arr_shSetUO(mut_fp(m), nr, sh)), xf);
}
u8 xk = xl - 3;
if (nia >= USZ_MAX) thrOOM();
rp = m_tyarrp(&r, 1<<xk, nia, xt);
bi = (u64)xia<<xk;
bf = (u64)nia<<xk;

View File

@ -380,6 +380,8 @@ b←1↓1∾a←"hello" ⋄ b ⌽⎊'e' ⥊⟜1⍟2 5 ⋄ a ≡○•Hash b %% 1
# 𝕨⥊𝕩
!"𝕨⥊𝕩: Result rank too large" % (03002)0
!"Out of memory" % %USE eqerr {(𝕩2) 1.1}¨_eqerr 63-10
!"Out of memory" % %USE eqerr {(𝕩2) 71.1}¨_eqerr 63-10
# 𝕨⍷𝕩
%USE eqvar "ab" _eqvar "" %%