diff options
author | rubidium <rubidium@openttd.org> | 2009-06-06 11:47:21 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-06-06 11:47:21 +0000 |
commit | ec3ef70adb40d9ff371082a7360652d58e425284 (patch) | |
tree | 232721f0f75e9a1b9075d8d3721d7e775b0307fc /src/ai/api/ai_tilelist.hpp | |
parent | 0b8ceb3007c018954203519b3768c45b3fa21920 (diff) | |
download | openttd-ec3ef70adb40d9ff371082a7360652d58e425284.tar.xz |
(svn r16524) -Fix [FS#2963]: missing guards in the NoAI API making it possible to hit an assert in OpenTTD.
Diffstat (limited to 'src/ai/api/ai_tilelist.hpp')
-rw-r--r-- | src/ai/api/ai_tilelist.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ai/api/ai_tilelist.hpp b/src/ai/api/ai_tilelist.hpp index f3d2f658d..085dc756a 100644 --- a/src/ai/api/ai_tilelist.hpp +++ b/src/ai/api/ai_tilelist.hpp @@ -71,8 +71,10 @@ public: /** * @param industry_id The industry to create the AITileList around. * @param radius The radius of the station you will be using. + * @pre AIIndustry::IsValidIndustry(industry_id). + * @pre radius > 0. */ - AITileList_IndustryAccepting(IndustryID industry_id, uint radius); + AITileList_IndustryAccepting(IndustryID industry_id, int radius); }; /** @@ -87,8 +89,10 @@ public: /** * @param industry_id The industry to create the AITileList around. * @param radius The radius of the station you will be using. + * @pre AIIndustry::IsValidIndustry(industry_id). + * @pre radius > 0. */ - AITileList_IndustryProducing(IndustryID industry_id, uint radius); + AITileList_IndustryProducing(IndustryID industry_id, int radius); }; /** |