summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/export/extract_version_1.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/export/extract_version_1.c b/src/export/extract_version_1.c
index f5a75b8..0e03e1e 100644
--- a/src/export/extract_version_1.c
+++ b/src/export/extract_version_1.c
@@ -94,15 +94,14 @@ static void split_to_files( uint8_t *entries, int num_entries )
94 94
95 *( g_state.outbuf[0] + g_state.outfill[0]++ ) = '0'; 95 *( g_state.outbuf[0] + g_state.outfill[0]++ ) = '0';
96 96
97 /* mimic flags from telefonbuch v4 */
97 if( entry ) 98 if( entry )
98 {
99 /* mimic flags from telefonbuch v4 */
100 *( g_state.outbuf[0] + g_state.outfill[0]++ ) = '2'; 99 *( g_state.outbuf[0] + g_state.outfill[0]++ ) = '2';
100 else {
101 *( g_state.outbuf[0] + g_state.outfill[0]++ ) = num_entries > 1 ? '1' : '0';
101 memcpy( g_state.outbuf[12] + g_state.outfill[12], g_state.ort, g_state.ort_len ); g_state.outfill[12] += g_state.ort_len; 102 memcpy( g_state.outbuf[12] + g_state.outfill[12], g_state.ort, g_state.ort_len ); g_state.outfill[12] += g_state.ort_len;
102 memcpy( g_state.outbuf[13] + g_state.outfill[13], g_state.zip, g_state.zip_len ); g_state.outfill[13] += g_state.zip_len; 103 memcpy( g_state.outbuf[13] + g_state.outfill[13], g_state.zip, g_state.zip_len ); g_state.outfill[13] += g_state.zip_len;
103 } 104 }
104 else
105 *( g_state.outbuf[0] + g_state.outfill[0]++ ) = num_entries > 1 ? '1' : '0';
106 105
107 *( g_state.outbuf[0 ] + g_state.outfill[0 ]++ ) = '\n'; 106 *( g_state.outbuf[0 ] + g_state.outfill[0 ]++ ) = '\n';
108 *( g_state.outbuf[12] + g_state.outfill[12]++ ) = '\n'; 107 *( g_state.outbuf[12] + g_state.outfill[12]++ ) = '\n';