From 2b1667d2828e4337fbee72d051d14e1c69453d9c Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Wed, 15 Dec 2010 10:03:03 +0100 Subject: [PATCH] Room info in banner should respect utf8 when cutting the text; fixed. --- webcit/roomtokens.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webcit/roomtokens.c b/webcit/roomtokens.c index 80561a457..cff35cdf5 100644 --- a/webcit/roomtokens.c +++ b/webcit/roomtokens.c @@ -468,8 +468,9 @@ void tmplput_ThisRoomInfoText(StrBuf *Target, WCTemplputParams *TP) } else { /* only a certain number of characters */ - StrBuf *SubBuf = NewStrBuf(); - StrBufSub(SubBuf, WCC->CurRoom.XInfoText, 0, nchars); + StrBuf *SubBuf; + SubBuf = NewStrBufDup(WCC->CurRoom.XInfoText); + StrBuf_Utf8StrCut(SubBuf, nchars); StrBufAppendBufPlain(SubBuf, HKEY("..."), 0); StrBufAppendTemplate(Target, TP, SubBuf, 1); FreeStrBuf(&SubBuf); -- 2.30.2