From 123213b3be4eb78eb9ffb4ec1dbada1a0b26b372 Mon Sep 17 00:00:00 2001 From: Fang Date: Fri, 13 Mar 2020 21:45:49 +0100 Subject: [PATCH] chat-cli: ensure bound map is sorted During upgrade, we gassed _in_ a map, instead of _by_, causing it to use set-style sorting, leading to incorrect lookups. This fixes that upgrade logic, and re-builds the map for existing instances. --- pkg/arvo/app/chat-cli.hoon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/arvo/app/chat-cli.hoon b/pkg/arvo/app/chat-cli.hoon index 227cd63e1..00468b2ee 100644 --- a/pkg/arvo/app/chat-cli.hoon +++ b/pkg/arvo/app/chat-cli.hoon @@ -185,7 +185,7 @@ :: ^- state-1 ?- -.u.old - %1 u.old(width 80) + %1 u.old(bound (~(gas by *(map target glyph)) ~(tap by bound.u.old))) :: ?(~ ^) :- %1 @@ -200,7 +200,7 @@ :: bound ^- (map target glyph) - %- ~(gas in *(map target glyph)) + %- ~(gas by *(map target glyph)) %+ turn ~(tap by bound.u.old) |= [t=[ship path] g=glyph] [`target`[| t] g]