]> granicus.if.org Git - postgis/commitdiff
Use __va_copy() to pass a copy of the variadic structure to lw_vasprintf() to solve...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Tue, 23 Sep 2008 21:32:19 +0000 (21:32 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Tue, 23 Sep 2008 21:32:19 +0000 (21:32 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@2998 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/vsprintf.c

index a183b5fb284850ccd6005f8544c3bc8f44e91ec6..abad18c2cd6488ec5dc1837675bc22328384bea3 100644 (file)
@@ -144,7 +144,12 @@ lw_vasprintf (result, format, args)
      const char *format;
      va_list args;
 {
-  return int_vasprintf (result, format, args);
+  va_list temp;
+
+  /* Use va_copy for compatibility with both 32 and 64 bit args */
+  __va_copy(temp, args);
+
+  return int_vasprintf (result, format, &temp);
 }
 
 int