Hi,
there is a mistake in the memory allocation. It should be as follows:
Code:
field = sys_malloc(sizeof(short*) * width); // array of pointers
	for(i=0;i<width;i++)
	{
		field[i] = sys_malloc(sizeof(short) * height);	// array of variables
	}



salud!