summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bratch <l_bratch@yahoo.co.uk>2010-10-29 22:41:36 +0100
committerLuke Bratch <l_bratch@yahoo.co.uk>2010-10-29 22:41:36 +0100
commitaf1b36c5339598c8837199e40aec2e66845a3556 (patch)
tree14b4175da05167f1a582186a2ef64acfd663c0ea
parentaac8fd309c0749bc7d6c12f0b5342ad9aa24b750 (diff)
Ensure command lengths are equal when matching to configuration file
-rw-r--r--blasms.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/blasms.c b/blasms.c
index 3d89468..e0c1020 100644
--- a/blasms.c
+++ b/blasms.c
@@ -221,6 +221,10 @@ int main(int argc, char *argv[]) {
//printf("Default command: %s\n", defaultcmd);
continue;
}
+ /* If the SMS command doesn't end here, continue */
+ if (sms[offset] != ' ') {
+ continue;
+ }
strxfrm(smscommand, sms, offset);
smscommand[offset] = '\0';
//printf("SMS command: %s\n", smscommand);