23 Feb
2018
23 Feb
'18
12:16 p.m.
On 22 February 2018 at 19:13, Józef Kucia <jkucia(a)codeweavers.com> wrote:
+static BOOL debug_append(struct debug_buffer *buffer, const char *str, const char *separator) +{ + int size; + + if (!separator || buffer->ptr == buffer->str) + separator = ""; + size = snprintf(buffer->ptr, buffer->size, "%s%s", separator, str); + if (size == -1 || size >= buffer->size) + { + buffer->size = 0; + return FALSE; + } I'm not especially concerned about it, but note that this would give no indication that any text was omitted. It may be helpful to e.g. replace the end of the debug string with "..." when this happens.