Thread: Angband 4.2.3
View Single Post
Old September 20, 2021, 10:36   #88
PowerWyrm's Avatar
Join Date: Apr 2008
Posts: 2,905
PowerWyrm is on a distinguished road
There's a potential crash when digging rubble:

/* Create a simple object */
				place_object(cave, grid, player->depth, false, false,
							 ORIGIN_RUBBLE, 0);

				/* Observe the new object */
				if (!ignore_item_ok(player,
						square_object(cave, grid))
						&& square_isseen(cave, grid)) {
					msg("You have found something!");
The place_object() function is not 100% guaranteed to generate an object at that location, which would produce a NULL pointer in square_object() on the line after.
PWMAngband variant maintainer - check (or to learn more about this new variant!
PowerWyrm is offline   Reply With Quote