Fix bug in emalloc of start and count.

This commit is contained in:
Russ Rew 2010-08-02 20:36:12 +00:00
parent 4a089699c9
commit ddf6b6722f

View File

@ -814,8 +814,8 @@ copy_var_data(int igrp, int varid, int ogrp, size_t copybuf_size) {
stat = nc_get_iter(igrp, varid, copybuf_size, &iter);
CHECK(stat, nc_get_iter);
start = (size_t *) emalloc(nvalues * sizeof(size_t));
count = (size_t *) emalloc(nvalues * sizeof(size_t));
start = (size_t *) emalloc(iter.rank * sizeof(size_t));
count = (size_t *) emalloc(iter.rank * sizeof(size_t));
/* nc_next_iter() initializes start and count on first call,
* changes start and count to iterate through whole variable on
* subsequent calls. */