mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
mesa/util: don't use the same 'va_list' instance twice
The first usage of the 'va_list' instance could change it. Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Fixes:864148d69e"util: add util_vasprintf() for Windows (v2)" Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com> (cherry picked from commit570cacba7a)
This commit is contained in:
parent
019ff6b453
commit
4a44ff8bad
1 changed files with 1 additions and 1 deletions
|
|
@ -119,7 +119,7 @@ util_vasprintf(char **ret, const char *format, va_list ap)
|
|||
|
||||
/* Compute length of output string first */
|
||||
va_copy(ap_copy, ap);
|
||||
int r = util_vsnprintf(NULL, 0, format, ap);
|
||||
int r = util_vsnprintf(NULL, 0, format, ap_copy);
|
||||
va_end(ap_copy);
|
||||
|
||||
if (r < 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue