Merge pull request #4468 from urbit/jb/nock-nine-one

u3: fix bytecode compiler error on nock 9 / axis 1
This commit is contained in:
Joe Bryan 2021-02-23 10:39:08 -08:00 committed by GitHub
commit a8437da8c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -29,4 +29,10 @@
%- expect-fail
|. .*(~ [%6 [%1 2] [%1 42] %1 43])
==
:: nock 9 should support axis 1
::
++ test-call-one
%+ expect-eq
!> 0
!> .*([3 0 1] [9 1 [0 1]])
--

View File

@ -1382,7 +1382,7 @@ _n_comp(u3_noun* ops, u3_noun fol, c3_o los_o, c3_o tel_o)
case 9:
u3x_cell(arg, &hed, &tel);
if ( 3 == u3qc_cap(hed) ) {
if ( (1 == hed) || (3 == u3qc_cap(hed)) ) {
u3_noun mac = u3nq(7, u3k(tel), 2, u3nt(u3nc(0, 1), 0, u3k(hed)));
tot_w += _n_comp(ops, mac, los_o, tel_o);
u3z(mac);