Fix out-of-bounds in test_move
Hero was on the top-left of an open map at (1,0), and a monster was trying to knock them back to (0,-1).
This commit is contained in:
@@ -972,10 +972,16 @@ test_move(
|
||||
{
|
||||
coordxy x = ux + dx;
|
||||
coordxy y = uy + dy;
|
||||
struct rm *tmpr = &levl[x][y];
|
||||
struct rm *tmpr;
|
||||
struct rm *ust;
|
||||
|
||||
svc.context.door_opened = FALSE;
|
||||
|
||||
if (!isok(x, y))
|
||||
return FALSE;
|
||||
|
||||
tmpr = &levl[x][y];
|
||||
|
||||
/*
|
||||
* Check for physical obstacles. First, the place we are going.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user