if (current_chunk >= num_chunks)
return NULL;
if (!current_chunk) {
- *len = entry;
- pos = 0;
- } else if (current_chunk == 1) {
*len = chunk_table[0];
pos = entry;
} else {
- *len = chunk_table[current_chunk - 1] - chunk_table[current_chunk - 2];
- pos = entry + chunk_table[current_chunk - 2];
+ *len = chunk_table[current_chunk] - chunk_table[current_chunk - 1];
+ pos = entry + chunk_table[current_chunk - 1];
}
if (inbuf_size < *len) {
inbuf = para_realloc(inbuf, *len);