Fixed bug with $attachments in shell command

SVN revision: 2347
This commit is contained in:
2010-12-23 09:30:49 +00:00
parent a5e17dc081
commit b1f627ba8b
+4 -2
View File
@@ -1272,8 +1272,7 @@ void strsubst_list(char *string, int size, char name[][NAME_LENGTH], char value[
/* check for $shell() subsitution */
pt = tmp;
ps = string;
p = strchr(ps, '$');
if (p != NULL) {
for (p = strchr(ps, '$'); p != NULL; p = strchr(ps, '$')) {
/* copy leading characters */
j = (int) (p - ps);
@@ -1317,6 +1316,9 @@ void strsubst_list(char *string, int size, char name[][NAME_LENGTH], char value[
strlcpy(pt, result, sizeof(tmp) - (pt - tmp));
pt += strlen(pt);
} else {
*pt++ = '$';
ps = p;
}
}