projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89b8bb8
)
Room info in banner should respect utf8 when cutting the text; fixed.
author
Wilfried Goesgens
<dothebart@citadel.org>
Wed, 15 Dec 2010 09:03:03 +0000
(10:03 +0100)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Wed, 15 Dec 2010 09:03:03 +0000
(10:03 +0100)
webcit/roomtokens.c
patch
|
blob
|
history
diff --git
a/webcit/roomtokens.c
b/webcit/roomtokens.c
index 80561a457f60c9a45e1c88686af4e459acdbdeed..cff35cdf560cb66923f4d2bba5784ef028bd967d 100644
(file)
--- 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);