if (*count > n_tag_records - offset)
*count = n_tag_records - offset;
if (offset > n_tag_records) {
fprintf(stderr, "Cannot access tag record beyond end\n");
if (*count > n_tag_records - offset)
*count = n_tag_records - offset;
if (offset > n_tag_records) {
fprintf(stderr, "Cannot access tag record beyond end\n");