Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX header.c sam_hdr_remove_line_pos() #1853

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

7PintsOfCherryGarcia
Copy link

@7PintsOfCherryGarcia 7PintsOfCherryGarcia commented Oct 23, 2024

Parameter check on argument 'position' was not accounting for 0 based indices as per header description:

/* sam.h
/// Remove nth line of a given type from a header
/*!

  • @param type Type of the searched line. Eg. "SQ"
  • @param position Index in lines of this type (zero-based). E.g. 3
  • @return 0 on success, -1 on error
  • Remove a line from the header by specifying the position in the type
  • group, i.e. 3rd @sq line.
    */
    HTSLIB_EXPORT
    int sam_hdr_remove_line_pos(sam_hdr_t *h, const char *type, int
    position);
    */

Parameter check on argument 'position' was not accounting for 0 based
indeces as per header description:

/* sam.h
/// Remove nth line of a given type from a header
/*!
 * @param type     Type of the searched line. Eg. "SQ"
 * @param position Index in lines of this type (zero-based). E.g. 3
 * @return         0 on success, -1 on error
 *
 * Remove a line from the header by specifying the position in the type
 * group, i.e. 3rd @sq line.
 */
HTSLIB_EXPORT
int sam_hdr_remove_line_pos(sam_hdr_t *h, const char *type, int
position);
*/
@jkbonfield jkbonfield merged commit cf0e756 into samtools:develop Oct 29, 2024
9 checks passed
@jkbonfield
Copy link
Contributor

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants