X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=webcit%2Froomtokens.c;h=917ac5a948ba614c447705343eb261ec78cac1d3;hp=cff35cdf560cb66923f4d2bba5784ef028bd967d;hb=a65e58f4cf84f22713c926d33ec95b830f60f183;hpb=5501b9a4ef0feebe9cd14f32c4e4a54e37d3267d diff --git a/webcit/roomtokens.c b/webcit/roomtokens.c index cff35cdf5..917ac5a94 100644 --- a/webcit/roomtokens.c +++ b/webcit/roomtokens.c @@ -470,8 +470,10 @@ void tmplput_ThisRoomInfoText(StrBuf *Target, WCTemplputParams *TP) /* only a certain number of characters */ StrBuf *SubBuf; SubBuf = NewStrBufDup(WCC->CurRoom.XInfoText); - StrBuf_Utf8StrCut(SubBuf, nchars); - StrBufAppendBufPlain(SubBuf, HKEY("..."), 0); + if (StrLength(SubBuf) > nchars) { + StrBuf_Utf8StrCut(SubBuf, nchars); + StrBufAppendBufPlain(SubBuf, HKEY("..."), 0); + } StrBufAppendTemplate(Target, TP, SubBuf, 1); FreeStrBuf(&SubBuf); }