From 2c25c51eb8b0f3f1a9321b2dede7afde9d2f67e4 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Mon, 4 May 2020 16:13:51 -0700 Subject: [PATCH] u3: fixes bug in +rub jet (unsafe coercion from c3_w to noun) --- pkg/urbit/jets/e/rub.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/urbit/jets/e/rub.c b/pkg/urbit/jets/e/rub.c index 716c0beb5..641e53035 100644 --- a/pkg/urbit/jets/e/rub.c +++ b/pkg/urbit/jets/e/rub.c @@ -14,7 +14,13 @@ u3_atom w, x, y, z; u3_atom p, q; - u3_atom m = u3qa_add(a, u3r_met(0, b)); + u3_atom m; + { + c3_w bit_w = u3r_met(0, b); + u3_noun bit = u3i_words(1, &bit_w); + m = u3qa_add(a, bit); + u3z(bit); + } // Compute c and d. {