comparison ffstools/caltools/c1xx-calextr.c @ 299:7fefa4f73c6a

c1xx-calextr: off-by-1 error in the Tx levels table conversion
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 18 Nov 2017 18:02:42 +0000
parents 734b38f634db
children 31369f326ee3
comparison
equal deleted inserted replaced
298:734b38f634db 299:7fefa4f73c6a
164 { 164 {
165 u_char tx_levels_table[128], *sp, *dp; 165 u_char tx_levels_table[128], *sp, *dp;
166 unsigned num_levels, n; 166 unsigned num_levels, n;
167 167
168 bzero(tx_levels_table, sizeof tx_levels_table); 168 bzero(tx_levels_table, sizeof tx_levels_table);
169 num_levels = band->end_plnum - band->start_plnum; 169 num_levels = band->end_plnum - band->start_plnum + 1;
170 sp = compal_data; 170 sp = compal_data;
171 dp = tx_levels_table + band->start_plnum * 4; 171 dp = tx_levels_table + band->start_plnum * 4;
172 for (n = 0; n < num_levels; n++) { 172 for (n = 0; n < num_levels; n++) {
173 *dp++ = *sp++; 173 *dp++ = *sp++;
174 *dp++ = *sp++; 174 *dp++ = *sp++;