Temporarily switching back to older bugless fasta libs while fixing a
bug
This commit is contained in:
5
libfasta/header_mem_handler.c
Normal file → Executable file
5
libfasta/header_mem_handler.c
Normal file → Executable file
@ -76,7 +76,7 @@ element_from_header** check_and_realloc_mem_in_header_table(element_from_header*
|
||||
{
|
||||
(*nbf)++;
|
||||
|
||||
if ((*nbf)+1 == *memory_allocated)
|
||||
if (*nbf == *memory_allocated)
|
||||
{
|
||||
(*memory_allocated)++;
|
||||
*p_header = (element_from_header*) realloc(*p_header, (*memory_allocated) * sizeof(element_from_header));
|
||||
@ -87,6 +87,7 @@ element_from_header** check_and_realloc_mem_in_header_table(element_from_header*
|
||||
|
||||
void end_header_table(element_from_header** p_header, int nbf)
|
||||
{
|
||||
*p_header = (element_from_header*) realloc(*p_header, nbf * sizeof(element_from_header));
|
||||
nbf = nbf - 1;
|
||||
//fprintf(stderr, "nbf = %d", nbf);
|
||||
sprintf((*p_header)->value, "%d", nbf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user