mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-24 11:25:30 +00:00
mxmlElementSetAttrf did not work with some versions of Visual Studio
(Issue #184)
This commit is contained in:
parent
6827e84f17
commit
876e6a9ac8
@ -1,6 +1,8 @@
|
||||
# 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))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user