Prevent illegal positions for tmp_at

It seems like m_throw() can call tmp_at() with !isok coordinates,
so prevent those in both functions
This commit is contained in:
Pasi Kallinen
2015-04-15 20:35:48 +03:00
parent 97f6834730
commit 5a08671fc0
2 changed files with 2 additions and 1 deletions

View File

@@ -440,7 +440,7 @@ struct obj *obj; /* missile (or stack providing it) */
tmp_at(bhitpos.x, bhitpos.y);
delay_output();
}
tmp_at(bhitpos.x, bhitpos.y);
if (isok(bhitpos.x, bhitpos.y)) tmp_at(bhitpos.x, bhitpos.y);
delay_output();
tmp_at(DISP_END, 0);