razf.c:
authorHenry Amrhein <hamrhein@caltech.edu>
Thu, 3 Jan 2013 22:49:36 +0000 (14:49 -0800)
committerHenry Amrhein <hamrhein@caltech.edu>
Thu, 3 Jan 2013 22:49:36 +0000 (14:49 -0800)
realloc() wrapper didn't assign the new pointer upon success.

razf.c

diff --git a/razf.c b/razf.c
index f67447c33bde6478787a5f95c9d60a14061bb6a3..022397169188e89a8ed49c4ef846fc18fa1a026b 100644 (file)
--- a/razf.c
+++ b/razf.c
@@ -90,6 +90,8 @@ static void add_zindex(RAZF *rz, int64_t in, int64_t out){
                        fprintf(stderr, "[%s] failure to allocate space for new zindex.\n", __func__);
                        abort();
                }
+               rz->index->cell_offsets = cores;
+               rz->index->bin_offsets = bores;
        }
        if(rz->index->size % RZ_BIN_SIZE == 0) rz->index->bin_offsets[rz->index->size / RZ_BIN_SIZE] = out;
        rz->index->cell_offsets[rz->index->size] = out - rz->index->bin_offsets[rz->index->size / RZ_BIN_SIZE];