Correction of memcpy in grid.cpp : the size was wrong