Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix jet mismatches and crashes #703

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from
Prev Previous commit
Next Next commit
++add punt on wrong type
Quodss committed Aug 11, 2024
commit f7d40a8b66a158c9051c4ca5c0e0615c1957ebd6
12 changes: 5 additions & 7 deletions pkg/noun/jets/a/add.c
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@

#include "noun.h"

u3_noun
u3_atom
u3qa_add(u3_atom a,
u3_atom b)
{
@@ -31,16 +31,14 @@ u3qa_add(u3_atom a,
}
}

u3_noun
u3_weak
u3wa_add(u3_noun cor)
{
u3_noun a, b;

if ( (c3n == u3r_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0)) ||
(c3n == u3ud(a)) ||
(c3n == u3ud(b) && a != 0) )
{
return u3m_bail(c3__exit);
u3x_mean(cor, u3x_sam_2, &a, u3x_sam_3, &b, 0);
if ( !_(u3ud(a)) || !_(u3ud(b)) ) {
return u3_none;
}
else {
return u3qa_add(a, b);