From 3b0999969632e2820b846ca8adcef6b346ff7441 Mon Sep 17 00:00:00 2001 From: lordjaxom Date: Sun, 12 Dec 2004 19:53:30 +0000 Subject: 1.0-pre3 --- xml/type.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xml/type.c') diff --git a/xml/type.c b/xml/type.c index d311b30..0cb5c9a 100644 --- a/xml/type.c +++ b/xml/type.c @@ -7,11 +7,12 @@ #include 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; -- cgit v1.2.3