From af1b36c5339598c8837199e40aec2e66845a3556 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Fri, 29 Oct 2010 22:41:36 +0100 Subject: Ensure command lengths are equal when matching to configuration file --- blasms.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'blasms.c') 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); -- cgit v1.2.3