forked from github/server
fix two live warnings (unicode trim and fleechance registration)
This commit is contained in:
parent
f2bb51b3ab
commit
03653a7338
|
@ -94,7 +94,6 @@ void register_attributes(void)
|
|||
at_register(&at_woodcount);
|
||||
|
||||
/* neue UNIT-Attribute */
|
||||
at_register(&at_fleechance);
|
||||
at_register(&at_siege);
|
||||
at_register(&at_effect);
|
||||
at_register(&at_private);
|
||||
|
|
|
@ -1610,10 +1610,12 @@ int display_cmd(unit * u, struct order *ord)
|
|||
|
||||
free(*s);
|
||||
if (s2) {
|
||||
*s = strdup(s2);
|
||||
if (strlen(s2) >= DISPLAYSIZE) {
|
||||
(*s)[DISPLAYSIZE] = 0;
|
||||
char * str = strdup(s2);
|
||||
unicode_utf8_trim(str);
|
||||
if (strlen(str) >= DISPLAYSIZE) {
|
||||
str[DISPLAYSIZE-1] = 0;
|
||||
}
|
||||
*s = str;
|
||||
}
|
||||
else {
|
||||
*s = 0;
|
||||
|
|
Loading…
Reference in New Issue