summaryrefslogtreecommitdiff
path: root/xml/type.c
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2004-12-12 19:53:30 +0000
committerlordjaxom <lordjaxom>2004-12-12 19:53:30 +0000
commit3b0999969632e2820b846ca8adcef6b346ff7441 (patch)
tree1582ed7db886839ea06c226e228eade0516f60c2 /xml/type.c
parente4c359b5c303cecfc49fb82799805da9fee8dadb (diff)
downloadvdr-plugin-text2skin-3b0999969632e2820b846ca8adcef6b346ff7441.tar.gz
vdr-plugin-text2skin-3b0999969632e2820b846ca8adcef6b346ff7441.tar.bz2
1.0-pre3v1.0-pre3
Diffstat (limited to 'xml/type.c')
-rw-r--r--xml/type.c5
1 files changed, 3 insertions, 2 deletions
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 <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;