From dc125c4db8e50abf68132748acfd0ba1b2e09fad Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Thu, 14 May 2015 02:42:19 +0200 Subject: Fix up differences in version no/sw --- src/export/split_version_2.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/export/split_version_2.c b/src/export/split_version_2.c index e886454..d3018dd 100644 --- a/src/export/split_version_2.c +++ b/src/export/split_version_2.c @@ -52,9 +52,9 @@ enum { g_outfiles = 17 }; static enum { CD_NO = 0, CD_S = 1, CD_W = 2 } g_cd; static int g_outfilemap[3][29] = { - {-1,-1,-1, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,14, 5,-1,16, 6,13,12, 8,10, 3, 9,-1, 7,11 }, - {-1,-1,-1, 0,-1,-1,-1,-1,-1,-1,-1,-1,11,-1, 6, 5,-1,-1,16, 8,10,14, 3, 9,13,12, 7,11 }, - {-1,-1,-1, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,13, 6,16, 5, 8,10, 3, 9,12,-1,14, 7,11 } + {-1,-1,-1, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,14, 6,-1,16, 5,13,12, 8,10, 3, 9,-1,-1, 7,11 }, + {-1,-1,-1, 0,-1,-1,-1,-1,-1,-1,-1,-1,11,-1, 6, 5,-1,-1,16, 8,10,14, 3, 9,13,-1,12, 7,11 }, + {-1,-1,-1, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,13, 6,16, 5, 8,10, 3, 9,12,-1,-1,14, 7,11 } }; static struct { @@ -115,9 +115,7 @@ static void dump_primary( uint8_t *end, uint32_t flags ) { dump_string( end, 1, 0 ); actually the entry is dumped in the caller when we know if this is the first line of a continuation. - Here we just skip the byte: */ - --end; /* Dump first 5 chars of zip, they're always there */ dump_string( end -= 5, 5, 1 ); @@ -136,18 +134,18 @@ static void dump_primary( uint8_t *end, uint32_t flags ) { if( g_cd != CD_NO ) dump_string( end -= 5, 5, 5 ); else - dump_field( &end, 5 ); + dump_field( &end, 6 ); } - if( flags & 0x0010 ) dump_field( &end, 6 ); + if( flags & 0x0010 ) dump_field( &end, g_cd == CD_NO ? 5 : 6 ); if( flags & 0x0008 ) dump_field( &end, 7 ); if( flags & 0x0004 ) dump_field( &end, 8 ); if( flags & 0x0002 ) dump_field( &end, 9 ); if( flags & 0x0001 ) dump_field( &end, 10 ); if( flags & 0x8000 ) dump_field( &end, 11 ); if( flags & 0x4000 ) dump_field( &end, 12 ); - if( flags & 0x2000 ) dump_field( &end, 13 ); - if( flags & 0x1000 ) dump_field( &end, 14 ); + if( flags & 0x2000 ) dump_field( &end, g_cd == CD_NO ? 13 : 14 ); + if( flags & 0x1000 ) dump_field( &end, g_cd == CD_NO ? 14 : 13 ); dump_field( &end, 15 ); -- cgit v1.2.3