diff options
author | louis <louis.braun@gmx.de> | 2015-04-30 17:11:34 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2015-04-30 17:11:34 +0200 |
commit | 563a0485ee0881ad747a7ff9d6c43544277ed594 (patch) | |
tree | 92cc1a783c463c58019331fd75788635cf24cafb /libtemplate/templatefunction.c | |
parent | 4fe74f843967d9823c027fc526e41a738573fa2b (diff) | |
download | vdr-plugin-skindesigner-563a0485ee0881ad747a7ff9d6c43544277ed594.tar.gz vdr-plugin-skindesigner-563a0485ee0881ad747a7ff9d6c43544277ed594.tar.bz2 |
fixed bug that tokens in image pathes are not replaced correctly
Diffstat (limited to 'libtemplate/templatefunction.c')
-rw-r--r-- | libtemplate/templatefunction.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libtemplate/templatefunction.c b/libtemplate/templatefunction.c index c99fa37..e186621 100644 --- a/libtemplate/templatefunction.c +++ b/libtemplate/templatefunction.c @@ -1292,6 +1292,12 @@ void cTemplateFunction::ParseStringParameters(void) { for (map < string, string >::iterator it = stringTokens->begin(); it != stringTokens->end(); it++) {
size_t found = path.find(it->first);
if (found != string::npos) {
+ size_t posEndBracket = found + (it->first).size();
+ if (posEndBracket < path.size()) {
+ string endChar = path.substr(posEndBracket, 1);
+ if (endChar.compare("}"))
+ continue;
+ }
updated = true;
imgPath = path;
if (found > 0 && ((it->first).size() + 2 <= imgPath.size()))
@@ -1302,6 +1308,12 @@ void cTemplateFunction::ParseStringParameters(void) { for (map < string, int >::iterator it = intTokens->begin(); it != intTokens->end(); it++) {
size_t found = path.find(it->first);
if (found != string::npos) {
+ size_t posEndBracket = found + (it->first).size();
+ if (posEndBracket < path.size()) {
+ string endChar = path.substr(posEndBracket, 1);
+ if (endChar.compare("}"))
+ continue;
+ }
updated = true;
imgPath = path;
if (found > 0 && ((it->first).size() + 2 <= imgPath.size())) {
|