changeset 2892 | 390125af7685 |
parent 2654 | df351c3ddd59 |
child 2912 | 510417d85b2c |
--- a/tree_cmd.c Thu Jan 26 18:36:14 2006 +0000 +++ b/tree_cmd.c Thu Jan 26 18:45:04 2006 +0000 @@ -139,7 +139,7 @@ int32 cost; int sx, sy, x, y; - if (p2 > MapSize()) return CMD_ERROR; + if (p2 >= MapSize()) return CMD_ERROR; /* Check the tree type. It can be random or some valid value within the current climate */ if (p1 != (uint)-1 && p1 - _tree_base_by_landscape[_opt.landscape] >= _tree_count_by_landscape[_opt.landscape]) return CMD_ERROR;