mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Correct mistake of last commit: restore order of blocks
This commit is contained in:
parent
045a9e3b00
commit
34c33b45b5
10
backend/qr.c
10
backend/qr.c
@ -525,17 +525,17 @@ static void add_ecc(unsigned char fullstream[], const unsigned char datastream[]
|
|||||||
unsigned char* interleaved_ecc;
|
unsigned char* interleaved_ecc;
|
||||||
#endif
|
#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) {
|
if (version < RMQR_VERSION) {
|
||||||
ecc_cw = qr_total_codewords[version - 1] - data_cw;
|
ecc_cw = qr_total_codewords[version - 1] - data_cw;
|
||||||
} else {
|
} else {
|
||||||
ecc_cw = rmqr_total_codewords[version - RMQR_VERSION] - data_cw;
|
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
|
#ifndef _MSC_VER
|
||||||
unsigned char data_block[short_data_block_length + 2];
|
unsigned char data_block[short_data_block_length + 2];
|
||||||
|
Loading…
Reference in New Issue
Block a user