Temporarily switching back to older bugless fasta libs while fixing a

bug
This commit is contained in:
Celine Mercier
2017-10-15 20:41:55 +02:00
parent f9d0ac00aa
commit 6373bc1c20
36 changed files with 84 additions and 83 deletions

5
libfasta/header_mem_handler.c Normal file → Executable file
View 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);
}