mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
fixed bug in printf token parsing
This commit is contained in:
parent
a29e3cc0c6
commit
9d2206fc59
@ -1456,10 +1456,12 @@ bool cTextExpr::ParsePrintfToken(cTextToken *t) {
|
|||||||
varTokens.push_back(buffer);
|
varTokens.push_back(buffer);
|
||||||
startVar = nextVar + 1;
|
startVar = nextVar + 1;
|
||||||
}
|
}
|
||||||
|
while (isspace(*startVar))
|
||||||
|
startVar++;
|
||||||
if (startVar+1) {
|
if (startVar+1) {
|
||||||
int varLen = end - startVar;
|
int varLen = end - startVar + 1;
|
||||||
buffer[0] = '{';
|
buffer[0] = '{';
|
||||||
strncpy((char*)buffer + 1, startVar + 1, varLen);
|
strncpy((char*)buffer + 1, startVar, varLen);
|
||||||
buffer[varLen] = '}';
|
buffer[varLen] = '}';
|
||||||
buffer[varLen+1] = '\0';
|
buffer[varLen+1] = '\0';
|
||||||
varTokens.push_back(buffer);
|
varTokens.push_back(buffer);
|
||||||
|
Loading…
Reference in New Issue
Block a user