diff options
Diffstat (limited to 'xml/type.c')
-rw-r--r-- | xml/type.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -7,11 +7,12 @@ #include <stdio.h> const std::string &cxType::String(void) { - static char buffer[50]; if (mType == number) { - snprintf(buffer, sizeof(buffer), "%d", mNumber); + char *buffer; + asprintf(&buffer, "%d", mNumber); mString = buffer; mType = string; + free(buffer); } else if (mType == boolean) { mString = mNumber ? cxFunction::True : cxFunction::False; mType = string; |