CID 22597: va_start/va_end mismatch

This commit is contained in:
Enno Rehling 2015-10-29 20:43:37 +01:00
parent 77ad91f8a4
commit d3f7bd7b10
1 changed files with 1 additions and 2 deletions

View File

@ -119,12 +119,11 @@ size_t slprintf(char * dst, size_t size, const char * format, ...)
va_start(args, format);
result = vsnprintf(dst, size, format, args);
va_end(args);
if (result < 0 || result >= (int)size) {
dst[size - 1] = '\0';
return size;
}
va_start(args, format);
va_end(args);
return (size_t)result;
}