From b35129e517f6d9107a588780c7f34e9f22d1d2e4 Mon Sep 17 00:00:00 2001 From: Fang Date: Thu, 14 May 2020 22:35:05 +0200 Subject: [PATCH] chat-cli: don't crash on %bad-text --- pkg/arvo/app/chat-cli.hoon | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/arvo/app/chat-cli.hoon b/pkg/arvo/app/chat-cli.hoon index 3d9b9e402f..8dbf808f8c 100644 --- a/pkg/arvo/app/chat-cli.hoon +++ b/pkg/arvo/app/chat-cli.hoon @@ -1452,8 +1452,13 @@ ~(glyph tr source) =/ lis=(list tape) %+ simple-wrap - ~| [%weird-text `@`+.letter] - `tape``(list @)`(tuba (trip +.letter)) + =/ result=(each tape tang) + %- mule |. + `(list @)`(tuba (trip +.letter)) + ?- -.result + %& p.result + %| "[[msg rendering error]]" + == (sub wyd (min (div wyd 2) (lent pef))) =+ lef=(lent pef) =+ ?:((gth (lent lis) 0) (snag 0 lis) "")