static analyzer bit in mkobj.c
src/mkobj.c(2211): warning: Reading invalid data from 'gl.level.objects[x]'.
This commit is contained in:
@@ -2208,6 +2208,7 @@ place_object(struct obj *otmp, coordxy x, coordxy y)
|
||||
panic("place_object: obj \"%s\" [%d] not free",
|
||||
safe_typename(otmp->otyp), otmp->where);
|
||||
|
||||
assert(x >= 0 && x < COLNO && y >= 0 && y < ROWNO);
|
||||
otmp2 = gl.level.objects[x][y];
|
||||
|
||||
obj_no_longer_held(otmp);
|
||||
|
||||
Reference in New Issue
Block a user