string: Fix va_copy fallback
Fix va_copy fallback reworked in 5cffba83.
Should fix #812.
diff --git a/xmlreader.c b/xmlreader.c
index e074da6..142e51f 100644
--- a/xmlreader.c
+++ b/xmlreader.c
@@ -58,7 +58,7 @@
#ifdef __va_copy
#define va_copy(dest, src) __va_copy(dest, src)
#else
- #define va_copy(dest, src) memcpy(dest, src, sizeof(va_list))
+ #define va_copy(dest, src) memcpy(&(dest), &(src), sizeof(va_list))
#endif
#endif
diff --git a/xmlstring.c b/xmlstring.c
index b5000e4..5f03e07 100644
--- a/xmlstring.c
+++ b/xmlstring.c
@@ -30,7 +30,7 @@
#ifdef __va_copy
#define va_copy(dest, src) __va_copy(dest, src)
#else
- #define va_copy(dest, src) memcpy(dest, src, sizeof(va_list))
+ #define va_copy(dest, src) memcpy(&(dest), &(src), sizeof(va_list))
#endif
#endif
diff --git a/xmlwriter.c b/xmlwriter.c
index b706889..9a128e3 100644
--- a/xmlwriter.c
+++ b/xmlwriter.c
@@ -36,7 +36,7 @@
#ifdef __va_copy
#define va_copy(dest, src) __va_copy(dest, src)
#else
- #define va_copy(dest, src) memcpy(dest, src, sizeof(va_list))
+ #define va_copy(dest, src) memcpy(&(dest), &(src), sizeof(va_list))
#endif
#endif