From aef71733e0912bc9ffd9df80c75378c11c70a361 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Tue, 12 May 2015 22:50:18 +0200 Subject: Fix: dump Ort and PLZ in the first record of a continuation. Until now it only was dumped in continuations --- src/export/extract_version_1.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') 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 ) *( g_state.outbuf[0] + g_state.outfill[0]++ ) = '0'; + /* mimic flags from telefonbuch v4 */ if( entry ) - { - /* mimic flags from telefonbuch v4 */ *( g_state.outbuf[0] + g_state.outfill[0]++ ) = '2'; + else { + *( g_state.outbuf[0] + g_state.outfill[0]++ ) = num_entries > 1 ? '1' : '0'; memcpy( g_state.outbuf[12] + g_state.outfill[12], g_state.ort, g_state.ort_len ); g_state.outfill[12] += g_state.ort_len; memcpy( g_state.outbuf[13] + g_state.outfill[13], g_state.zip, g_state.zip_len ); g_state.outfill[13] += g_state.zip_len; } - else - *( g_state.outbuf[0] + g_state.outfill[0]++ ) = num_entries > 1 ? '1' : '0'; *( g_state.outbuf[0 ] + g_state.outfill[0 ]++ ) = '\n'; *( g_state.outbuf[12] + g_state.outfill[12]++ ) = '\n'; -- cgit v1.2.3