Quote:
Originally Posted by ephemera
new_pointer = realloc(pointer, (pointer_size+100) * sizeof(int));
|
Duh, what a stupid mistake. Thanks ephemera! This has, of course, fixed things perfectly and valgrind now reports zero errors. I think I'll make a habit of avoiding calloc in favour of malloc in future on account of this, so that always using sizeof becomes a habit.