Fixed a bug in the array indexer where the value's length was no

properly set to 0 if the value was NA (ignore previous commit with the
same message)
This commit is contained in:
Celine Mercier
2018-11-27 16:18:34 +01:00
parent 6f27734d71
commit fbabbceb5a

View File

@ -71,13 +71,19 @@ const void* obi_column_get_array(OBIDMS_column_p column, index_t line_nb, int32_
index_t idx;
if (obi_column_prepare_to_get_value(column, line_nb) < 0)
{
*value_length_p = -1;
return OBITuple_NA;
}
idx = *(((index_t*) (column->data)) + line_nb);
// Check NA
if (idx == OBIIdx_NA)
{
*value_length_p = 0;
return OBITuple_NA;
}
return obi_retrieve_array(column->indexer, idx, value_length_p);
}