diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c index 08c87d2efd..2af7d4b481 100644 --- a/jets/f/ut_burn.c +++ b/jets/f/ut_burn.c @@ -58,7 +58,7 @@ if ( c3n == u3du(sut) ) switch ( sut ) { default: return u3m_bail(c3__fail); - case c3__noun: return 0; + case c3__noun: return u3nc(u3_nul, 0); case c3__void: { return u3_nul; } @@ -68,7 +68,11 @@ case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut); { - return u3k(q_sut); + if ( c3y == u3du(q_sut) ) { + return u3nc(u3_nul, u3k(u3t(q_sut))); + } else { + return u3nc(u3_nul, 0); + } } case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); { @@ -144,7 +148,17 @@ _cqfu_burn(u3_noun van, u3_noun sut) { - return _burn_in(van, sut, u3_nul); + u3_noun unt = _burn_in(van, sut, u3_nul); + + if ( u3_nul == unt ) { + return u3m_error("burn"); + } + else { + u3_noun ret = u3k(u3t(unt)); + + u3z(unt); + return ret; + } } u3_noun diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index 93eaaad17c..9a02dbc3e9 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -615,12 +615,7 @@ { u3_noun cag = u3qfu_burn(van, sut); - u3_noun wim; - if ( 0 == cag ) { - wim = u3nc(2, 0); - } else { - wim = u3n_nock_an(u3k(u3t(cag)), u3k(q_nef)); - } + u3_noun wim = u3n_nock_an(cag, u3k(q_nef)); if ( 0 == u3h(wim) ) { fom = u3nc(1, u3k(u3t(wim)));