comparison trau-decode/trau-hr-dump.c @ 42:61181373875d

trau-hr-dump: off-by-one error in file end limit
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 12 Sep 2024 21:58:26 +0000
parents 9bcdb091c24d
children
comparison
equal deleted inserted replaced
41:b5feb04b212c 42:61181373875d
198 { 198 {
199 unsigned p, endp; 199 unsigned p, endp;
200 int sync = 0, match; 200 int sync = 0, match;
201 201
202 endp = total_size - 160; 202 endp = total_size - 160;
203 for (p = 0; p < endp; ) { 203 for (p = 0; p <= endp; ) {
204 match = check_sync(p); 204 match = check_sync(p);
205 if (match != sync) { 205 if (match != sync) {
206 printf("# %s frame sync at file offset 0x%x\n", 206 printf("# %s frame sync at file offset 0x%x\n",
207 match ? "Acquired" : "Lost", p); 207 match ? "Acquired" : "Lost", p);
208 } 208 }