- StrBufAppendTemplate(Target, TP, WCC->CurRoom.XAPass, 1);
+ nchars = GetTemplateTokenNumber(Target, TP, 0, 0);
+ if (!nchars) {
+ /* the whole thing */
+ StrBufAppendTemplate(Target, TP, WCC->CurRoom.XInfoText, 1);
+ }
+ else {
+ /* only a certain number of characters */
+ StrBuf *SubBuf = NewStrBuf();
+ StrBufSub(SubBuf, WCC->CurRoom.XInfoText, 0, nchars);
+ StrBufAppendBufPlain(SubBuf, HKEY("..."), 0);
+ StrBufAppendTemplate(Target, TP, SubBuf, 1);
+ FreeStrBuf(&SubBuf);
+ }