From 29e5c6785ba97d292901c36fcdd300f489e838a7 Mon Sep 17 00:00:00 2001 From: Pyry Kovanen Date: Wed, 11 Oct 2023 22:01:05 +0300 Subject: [PATCH] zuse: fix +de:base64:mimes:html --- pkg/arvo/sys/zuse.hoon | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/arvo/sys/zuse.hoon b/pkg/arvo/sys/zuse.hoon index 8eb35862eb..54c7bce864 100644 --- a/pkg/arvo/sys/zuse.hoon +++ b/pkg/arvo/sys/zuse.hoon @@ -4298,8 +4298,11 @@ ~&(%base-64-padding-err-two ~) =/ len (sub (mul 3 (div (add lat dif) 4)) dif) :+ ~ len - %+ swp 3 - (rep [0 6] (flop (weld dat (reap dif 0)))) + =/ res (rsh [1 dif] (rep [0 6] (flop dat))) + =/ amt (met 3 res) + :: left shift trailing zeroes in after byte swap + =/ trl ?: (lth len amt) 0 (sub len amt) + (lsh [3 trl] (swp 3 res)) -- -- ::