fixed bad memory access in case an int token is not set
This commit is contained in:
parent
2ba17dda6a
commit
15feb0e16e
|
@ -1220,8 +1220,10 @@ char *cTextExpr::DeterminateText(void) {
|
||||||
strcat(retVal, str);
|
strcat(retVal, str);
|
||||||
} else if (t->type == eTexttokenType::inttoken) {
|
} else if (t->type == eTexttokenType::inttoken) {
|
||||||
int value = tokenContainer->IntToken(t->tokenIndex);
|
int value = tokenContainer->IntToken(t->tokenIndex);
|
||||||
|
if (value > 0) {
|
||||||
cString str = cString::sprintf("%d", value);
|
cString str = cString::sprintf("%d", value);
|
||||||
strcat(retVal, *str);
|
strcat(retVal, *str);
|
||||||
|
}
|
||||||
} else if (t->type == eTexttokenType::looptoken && loopInfo && loopInfo->row >= 0) {
|
} else if (t->type == eTexttokenType::looptoken && loopInfo && loopInfo->row >= 0) {
|
||||||
char *str = tokenContainer->LoopToken(loopInfo->index, loopInfo->row, t->tokenIndex);
|
char *str = tokenContainer->LoopToken(loopInfo->index, loopInfo->row, t->tokenIndex);
|
||||||
if (str)
|
if (str)
|
||||||
|
|
Loading…
Reference in New Issue