mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-29 06:15:23 -04:00
Correct mistake of last commit: restore order of blocks
This commit is contained in:
parent
045a9e3b00
commit
34c33b45b5
1 changed files with 5 additions and 5 deletions
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…
Add table
Add a link
Reference in a new issue