diff options
Diffstat (limited to 'blasms.c')
-rw-r--r-- | blasms.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -143,7 +143,7 @@ int main(int argc, char *argv[]) { char configcmd[8]; /* strchr pointer */ char *strchrp; - /* Command match */ + /* Command match / telnum set */ short int match = 0; if (argc != 3 || !strcmp(argv[argc - 1], "--help")) { @@ -241,6 +241,7 @@ int main(int argc, char *argv[]) { } //printf("Command: %s\n", systemcmd); + match = 0; for (i = 0; i < strlen(systemcmd); i++) { if (systemcmd[i] == '%') { @@ -259,7 +260,10 @@ int main(int argc, char *argv[]) { replacestr(systemcmd, i, sms + offset + 1); break; case 'P': - settelnum(telnum, sms, &offset); + if (!match) { + settelnum(telnum, sms, &offset); + } + match = 1; replacestr(systemcmd, i, telnum); break; } |