texteff.c
changeset 5427 4a2c1c71bddf
parent 5026 d589561bc43d
child 5428 00fab4aeff78
equal deleted inserted replaced
5426:d3d5733c5e3a 5427:4a2c1c71bddf
   322 	TileIndex* ti;
   322 	TileIndex* ti;
   323 
   323 
   324 	for (ti = _animated_tile_list; ti != endof(_animated_tile_list); ti++) {
   324 	for (ti = _animated_tile_list; ti != endof(_animated_tile_list); ti++) {
   325 		if (tile == *ti) {
   325 		if (tile == *ti) {
   326 			/* remove the hole */
   326 			/* remove the hole */
   327 			memmove(ti, ti + 1, endof(_animated_tile_list) - 1 - ti);
   327 			memmove(ti, ti + 1, (lastof(_animated_tile_list) - ti) * sizeof(_animated_tile_list[0]));
   328 			/* and clear last item */
   328 			/* and clear last item */
   329 			endof(_animated_tile_list)[-1] = 0;
   329 			endof(_animated_tile_list)[-1] = 0;
   330 			MarkTileDirtyByTile(tile);
   330 			MarkTileDirtyByTile(tile);
   331 			return;
   331 			return;
   332 		}
   332 		}