forked from github/server
unicode fix to abbreviated orders
This commit is contained in:
parent
5dd5a402cb
commit
fa375ed8b4
1 changed files with 8 additions and 2 deletions
|
@ -119,8 +119,14 @@ get_command(const order * ord, char * sbuffer, size_t size)
|
||||||
bytes = (int)strlcpy(bufp, (const char *)text, size);
|
bytes = (int)strlcpy(bufp, (const char *)text, size);
|
||||||
if (wrptr(&bufp, &size, bytes)!=0) {
|
if (wrptr(&bufp, &size, bytes)!=0) {
|
||||||
WARN_STATIC_BUFFER();
|
WARN_STATIC_BUFFER();
|
||||||
if (bufp-sbuffer>=5) {
|
if (bufp-sbuffer>=6) {
|
||||||
memcpy(bufp-5, "[...]", 5); /* TODO: make sure this only happens in eval_command */
|
bufp -= 6;
|
||||||
|
while (bufp>sbuffer&& (*bufp&0x80)!=0) {
|
||||||
|
++size;
|
||||||
|
--bufp;
|
||||||
|
}
|
||||||
|
memcpy(bufp+1, "[...]", 5); /* TODO: make sure this only happens in eval_command */
|
||||||
|
bufp += 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue