Correct mistake of last commit: restore order of blocks

This commit is contained in:
Harald Oehlmann 2019-12-05 19:36:00 +01:00
parent 045a9e3b00
commit 34c33b45b5

View File

@ -525,17 +525,17 @@ static void add_ecc(unsigned char fullstream[], const unsigned char datastream[]
unsigned char* interleaved_ecc;
#endif
short_data_block_length = data_cw / blocks;
qty_long_blocks = data_cw % blocks;
qty_short_blocks = blocks - qty_long_blocks;
ecc_block_length = ecc_cw / blocks;
if (version < RMQR_VERSION) {
ecc_cw = qr_total_codewords[version - 1] - data_cw;
} else {
ecc_cw = rmqr_total_codewords[version - RMQR_VERSION] - data_cw;
}
short_data_block_length = data_cw / blocks;
qty_long_blocks = data_cw % blocks;
qty_short_blocks = blocks - qty_long_blocks;
ecc_block_length = ecc_cw / blocks;
#ifndef _MSC_VER
unsigned char data_block[short_data_block_length + 2];