Browse Source

Use va_end() in string::fV().

tags/v2.4.1
Andrew Belt 1 year ago
parent
commit
06f0a77629
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      src/string.cpp

+ 1
- 0
src/string.cpp View File

@@ -28,6 +28,7 @@ std::string fV(const char* format, va_list args) {
// va_lists cannot be reused but we need it twice, so clone args.
va_list args2;
va_copy(args2, args);
DEFER({va_end(args2);});
// Compute size of required buffer
int size = vsnprintf(NULL, 0, format, args);
if (size < 0)


Loading…
Cancel
Save