Commit 876e6a9a authored by Michael Sweet's avatar Michael Sweet

mxmlElementSetAttrf did not work with some versions of Visual Studio

(Issue #184)
parent 6827e84f
# Changes in Mini-XML 2.11
- Fixed a memory leak in mxmlDelete (Issue #183)
- mxmlElementSetAttrf did not work with some versions of Visual Studio
(Issue #184)
- The configure script now properly supports cross-compilation (Issue #188)
......
......@@ -474,7 +474,6 @@ _mxml_vstrdupf(const char *format, /* I - Printf-style format string */
int bytes; /* Number of bytes required */
char *buffer, /* String buffer */
temp[256]; /* Small buffer for first vsnprintf */
va_list apcopy; /* Copy of argument list */
/*
......@@ -482,8 +481,15 @@ _mxml_vstrdupf(const char *format, /* I - Printf-style format string */
* needed...
*/
# ifdef WIN32
bytes = _vscprintf(format, ap);
# else
va_list apcopy; /* Copy of argument list */
va_copy(apcopy, ap);
bytes = vsnprintf(temp, sizeof(temp), format, apcopy);
# endif /* WIN32 */
if (bytes < sizeof(temp))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment