Commit 6877fc48 authored by Celine Mercier's avatar Celine Mercier

Fixed a critical bug where values were initialized to NA at the wrong

location when there was multiple elements per line
parent dbed3d9d
......@@ -1271,12 +1271,13 @@ int obi_truncate_and_close_column(OBIDMS_column_p column)
void obi_ini_to_NA_values(OBIDMS_column_p column,
size_t start,
size_t first_line_nb,
size_t nb_lines)
{
size_t i, end, nb_elements;
size_t i, start, end, nb_elements;
nb_elements = nb_lines*((column->header)->nb_elements_per_line);
start = first_line_nb*((column->header)->nb_elements_per_line);
end = start + nb_elements;
switch ((column->header)->data_type) {
......
......@@ -280,7 +280,7 @@ int obi_truncate_and_close_column(OBIDMS_column_p column);
* @since August 2015
* @author Celine Mercier (celine.mercier@metabarcoding.org)
*/
void obi_ini_to_NA_values(OBIDMS_column_p column, size_t start, size_t nb_lines);
void obi_ini_to_NA_values(OBIDMS_column_p column, size_t first_line_nb, size_t nb_lines); // TO make private?
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment