diff --git a/src/obidmscolumn.c b/src/obidmscolumn.c index 085c335..d01c1ce 100644 --- a/src/obidmscolumn.c +++ b/src/obidmscolumn.c @@ -1466,7 +1466,7 @@ int obi_truncate_column(OBIDMS_column_p column) // TODO is it necessary to unmap // Compute the new line count = the number of lines used rounded to the nearest greater multiple of page size greater than 0 multiple = ceil((double) (ONE_IF_ZERO((column->header)->lines_used) * (column->header)->nb_elements_per_line * obi_sizeof((column->header)->stored_data_type)) / (double) getpagesize()); - new_line_count = floor((((int) multiple) * getpagesize()) / ((column->header)->nb_elements_per_line * obi_sizeof((column->header)->stored_data_type))); + new_line_count = floor((((int64_t) multiple) * ((int64_t) getpagesize())) / ((column->header)->nb_elements_per_line * obi_sizeof((column->header)->stored_data_type))); data_size = obi_array_sizeof((column->header)->stored_data_type, new_line_count, (column->header)->nb_elements_per_line);