getsect() can fail here only when the coordinates are invalid. The
first check uses coordinates from a successful sarg_xy(), so they
can't be invalid. The second check uses coordinates of an object to
be put on the mission. If these are invalid, game state is corrupt,
and failing the mission command doesn't improve the situation a bit.
int mission;
coord x, y;
int desired_radius, radius;
- struct sctstr opsect;
union empobj_storage item;
struct empobj *gp;
int num = 0, mobmax, mobused;
if (*p != '.') {
if (!sarg_xy(p, &x, &y))
return RET_SYN;
-
- if (!getsect(x, y, &opsect))
- return RET_FAIL;
}
if (player->argp[5] != NULL) {
if (*p == '.') {
x = gp->x;
y = gp->y;
- if (!getsect(x, y, &opsect))
- return RET_FAIL;
}
radius = oprange(gp, mission);