fixed whitespace handling in printf function

This commit is contained in:
louis 2016-02-14 10:18:46 +01:00
parent 856dc5d416
commit 6eda200228
1 changed files with 6 additions and 0 deletions

View File

@ -1464,6 +1464,12 @@ bool cTextExpr::ParsePrintfToken(cTextToken *t) {
strncpy((char*)buffer + 1, startVar, varLen);
buffer[varLen] = '}';
buffer[varLen+1] = '\0';
int i = 1;
while(isspace(buffer[varLen-i])) {
buffer[varLen-i] = '}';
buffer[varLen-i+1] = '\0';
i++;
}
varTokens.push_back(buffer);
}
//evaluate variables