Richard Nyberg pirms 18 gadiem
vecāks
revīzija
68c4f99b29
1 mainītis faili ar 5 papildinājumiem un 2 dzēšanām
  1. +5
    -2
      libevent/buffer.c

+ 5
- 2
libevent/buffer.c Parādīt failu

@@ -132,17 +132,20 @@ evbuffer_add_vprintf(struct evbuffer *buf, const char *fmt, va_list ap)
size_t space;
size_t oldoff = buf->off;
int sz;
va_list aq;

for (;;) {
buffer = buf->buffer + buf->off;
space = buf->totallen - buf->misalign - buf->off;

va_copy(aq, ap);
#ifdef WIN32
sz = vsnprintf(buffer, space - 1, fmt, ap);
sz = vsnprintf(buffer, space - 1, fmt, aq);
buffer[space - 1] = '\0';
#else
sz = vsnprintf(buffer, space, fmt, ap);
sz = vsnprintf(buffer, space, fmt, aq);
#endif
va_end(aq);
if (sz == -1)
return (-1);
if (sz < space) {


Notiek ielāde…
Atcelt
Saglabāt