aboutsummaryrefslogtreecommitdiff
path: root/contactList.c
diff options
context:
space:
mode:
Diffstat (limited to 'contactList.c')
-rw-r--r--contactList.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/contactList.c b/contactList.c
index 891054c..728cade 100644
--- a/contactList.c
+++ b/contactList.c
@@ -191,7 +191,9 @@ int writeContactList(const char* filename) {
}
for( int i = 0 ; i < nbContacts ; i++) {
- fprintf(file, "%s;%s;%s\n", contactList[i].name, contactList[i].display_name, contactList[i].number);
+ if( *contactList[i].name ) {
+ fprintf(file, "%s;%s;%s\n", contactList[i].name, contactList[i].display_name, contactList[i].number);
+ }
}
fclose(file);