Skip to content

Commit b72f6a0

Browse files
committed
bugfix for sac=0 in filtersacsic_s and filtercat_s
1 parent 383b14b commit b72f6a0

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
extraer radar+adsb de una grabación multiradar).
1010
- SOPORTE: añadida configuración por defecto para problemas
1111
en radares con psr, grabaciones mssrs,scdi y lan ext.
12+
- BUG: filtercat_s y filtersacsic_s no soportaban sac=0
1213

1314
0.77
1415
- TIP: para quitar la sequencias ansi al activar dest_debug

src/utils/cleanast_s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ int main(int argc, char *argv[]) {
105105
if ( 0 != header_bytes ) {
106106
ptr = calloc(1, header_bytes);
107107
if ( header_bytes != (rcount = read_bytes(ptr, header_bytes, fin)) ) {
108-
fprintf(stderr, "error reading header header_bytes(%d) rcount(%zu)\n", header_bytes, rcount);
108+
fprintf(stderr, "error reading header header_bytes(%d) rcount(%zd)\n", header_bytes, rcount);
109109
exit(EXIT_FAILURE);
110110
}
111111
if ( DEBUG ) print_bytes(ptr, header_bytes);

src/utils/filtercat_s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ int main(int argc, char *argv[]) {
161161

162162
// fprintf(stderr, "%02X %02X ____ ", -cat, ptr[0]);
163163

164-
if ( ((0 < cat) && (cat == ptr[0])) || // cat positivo
164+
if ( ((0 <= cat) && (cat == ptr[0])) || // cat positivo
165165
((0 > cat) && (-cat != ptr[0])) ) { // cat negativo
166166
// fprintf(stderr, "%02X %02X\n", cat, ptr[0]);
167167
if ( DEBUG ) fprintf(stderr, "OK\n");

src/utils/filtersacsic_s.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ int main(int argc, char *argv[]) {
185185
// si queremos quitar dos parejas, (usando la segunda pareja como negativa) la segunda
186186
// no se tiene en cuenta
187187

188-
if ( (((0 < sac1) && (sac1 == db_sac)) && // sac positivo
189-
((0 < sic1) && (sic1 == db_sic)) ) ||
190-
( argc == 10 && 0 < sac2 && sac2 == db_sac && 0 < sic2 && sic2 == db_sic )
188+
if ( (((0 <= sac1) && (sac1 == db_sac)) && // sac positivo
189+
((0 <= sic1) && (sic1 == db_sic)) ) ||
190+
( argc == 10 && 0 <= sac2 && sac2 == db_sac && 0 <= sic2 && sic2 == db_sic )
191191
) { // sic positivo
192192
if ( DEBUG ) fprintf(stderr, "MATCH sac1/sic1 || MATCH sac2/sic2\n");
193193
write_bytes(pre_ptr, pre_bytes, fout);

0 commit comments

Comments
 (0)