equal
deleted
inserted
replaced
326 } |
326 } |
327 |
327 |
328 // ------------------------------------------------------------------ |
328 // ------------------------------------------------------------------ |
329 void xmlStream::va_done(const char* format, va_list ap) { |
329 void xmlStream::va_done(const char* format, va_list ap) { |
330 char buffer[200]; |
330 char buffer[200]; |
331 guarantee(strlen(format) + 10 < sizeof(buffer), "bigger format buffer") |
331 guarantee(strlen(format) + 10 < sizeof(buffer), "bigger format buffer"); |
332 const char* kind = format; |
332 const char* kind = format; |
333 const char* kind_end = strchr(kind, ' '); |
333 const char* kind_end = strchr(kind, ' '); |
334 size_t kind_len = (kind_end != NULL) ? (kind_end - kind) : strlen(kind); |
334 size_t kind_len = (kind_end != NULL) ? (kind_end - kind) : strlen(kind); |
335 strncpy(buffer, kind, kind_len); |
335 strncpy(buffer, kind, kind_len); |
336 strcpy(buffer + kind_len, "_done"); |
336 strcpy(buffer + kind_len, "_done"); |