summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2016-03-21 22:47:35 +0100
committerlouis <louis.braun@gmx.de>2016-03-21 22:47:35 +0100
commit15feb0e16ed05227d92385978ab6fe256d928ca6 (patch)
treef1d33de6034daeb925be6a5fdce159267c58b4f2
parent2ba17dda6a3bc7281178e87c81957be60c1a3a7d (diff)
downloadvdr-plugin-skindesigner-15feb0e16ed05227d92385978ab6fe256d928ca6.tar.gz
vdr-plugin-skindesigner-15feb0e16ed05227d92385978ab6fe256d928ca6.tar.bz2
fixed bad memory access in case an int token is not set
-rw-r--r--coreengine/complextypes.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/coreengine/complextypes.c b/coreengine/complextypes.c
index a660dca..7c9f77a 100644
--- a/coreengine/complextypes.c
+++ b/coreengine/complextypes.c
@@ -1220,8 +1220,10 @@ char *cTextExpr::DeterminateText(void) {
strcat(retVal, str);
} else if (t->type == eTexttokenType::inttoken) {
int value = tokenContainer->IntToken(t->tokenIndex);
- cString str = cString::sprintf("%d", value);
- strcat(retVal, *str);
+ if (value > 0) {
+ cString str = cString::sprintf("%d", value);
+ strcat(retVal, *str);
+ }
} else if (t->type == eTexttokenType::looptoken && loopInfo && loopInfo->row >= 0) {
char *str = tokenContainer->LoopToken(loopInfo->index, loopInfo->row, t->tokenIndex);
if (str)