diff options
author | Luke Bratch <l_bratch@yahoo.co.uk> | 2010-10-30 01:51:45 +0100 |
---|---|---|
committer | Luke Bratch <l_bratch@yahoo.co.uk> | 2010-10-30 01:51:45 +0100 |
commit | 4e59ebc5eb23805b596b4f60011ec233bc3f8d3f (patch) | |
tree | 59493ce8280d7f54d61a6d8152291fda092a518d | |
parent | 9df202451be8699dd32cbbd715acb9b5b547c6b1 (diff) |
Fix off-by-one error in name to number lookups after multiple name phonebook changes
-rw-r--r-- | blasms.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -123,7 +123,7 @@ void settelnum(char* telnum, char* sms, int *offsetptr) { curname[j] = '\0'; if (!strcmp(name, curname)) { strncpy(telnum, line, offset - 1); - telnum[offset] = '\0'; + telnum[offset - 1] = '\0'; *offsetptr = *offsetptr + strlen(name) + 1; return; } else { |