[polypaudio-commits] r1017 - /trunk/src/polypcore/core-util.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Tue Jun 13 08:54:13 PDT 2006


Author: ossman
Date: Tue Jun 13 17:54:11 2006
New Revision: 1017

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1017&root=polypaudio&view=rev
Log:
Make a copy of the va_list as vsnprintf() is free to change it.

Modified:
    trunk/src/polypcore/core-util.c

Modified: trunk/src/polypcore/core-util.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polypcore/core-util.c?rev=1017&root=polypaudio&r1=1016&r2=1017&view=diff
==============================================================================
--- trunk/src/polypcore/core-util.c (original)
+++ trunk/src/polypcore/core-util.c Tue Jun 13 17:54:11 2006
@@ -366,8 +366,14 @@
     
     for(;;) {
         int r;
+        va_list aq;
+
+        va_copy(aq, ap);
+
         c = pa_xrealloc(c, size);
-        r = vsnprintf(c, size, format, ap);
+        r = vsnprintf(c, size, format, aq);
+
+        va_end(aq);
         
         if (r > -1 && r < size)
             return c;




More information about the pulseaudio-commits mailing list