maybe_escape_markup: Don't mangle output if markup is disabled
As it is, the code modifies the first char of `buffer`, increasing it by the number of bytes written.
This commit is contained in:
parent
10397688c9
commit
200fef9e0d
@ -92,7 +92,7 @@ void maybe_escape_markup(char *text, char *buffer, size_t size) {
|
||||
size--; /* Leave a byte for NUL termination. */
|
||||
|
||||
if (markup_format == M_NONE) {
|
||||
*buffer += snprintf(buffer, size, "%s", text);
|
||||
snprintf(buffer, size, "%s", text);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user