summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2014-02-24 02:15:24 +0100
committerDirk Engling <erdgeist@erdgeist.org>2014-02-24 02:15:24 +0100
commita9c32ef3e85a736180fd497f3e353e47f98a4457 (patch)
tree83689c74f904bdabc353a7327396962c6f99efa0
parent8d11183e27f116057bed713c8f0d224af6427302 (diff)
Only write leading zero to Vorwahl, if it actually contains numbers
-rw-r--r--src/export/extract_version_1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/export/extract_version_1.c b/src/export/extract_version_1.c
index ae81dc5..27489ec 100644
--- a/src/export/extract_version_1.c
+++ b/src/export/extract_version_1.c
@@ -73,7 +73,7 @@ void split_to_files( uint8_t *entries, int num_entries )
73 char * end = strchr( e, '\t' ); 73 char * end = strchr( e, '\t' );
74 if( end ) { 74 if( end ) {
75 *end = '\n'; 75 *end = '\n';
76 if( column == 9 ) write( g_state.outfiles[column+1], "0", 1 ); /* Augment Vorwahl */ 76 if( column == 9 && *e >= '0' && *e <= '9' ) write( g_state.outfiles[column+1], "0", 1 ); /* Augment Vorwahl */
77 write( g_state.outfiles[column+1], e, end - e + 1); 77 write( g_state.outfiles[column+1], e, end - e + 1);
78 e = end + 1; 78 e = end + 1;
79 } else 79 } else