diff options
author | yexo <yexo@openttd.org> | 2010-03-16 06:25:35 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-03-16 06:25:35 +0000 |
commit | 43be04eb27854a3195a16a7e5918eccf2f1d15a4 (patch) | |
tree | 3cac38ff26ac96b35ff4c4610e474c2ef7195096 | |
parent | ef8deb2edd34f2be07515029b7aebe0f45f853c7 (diff) | |
download | openttd-43be04eb27854a3195a16a7e5918eccf2f1d15a4.tar.xz |
(svn r19432) -Fix [FS#3696] (r19357): crash when the error message 'owned by <town>' was shown
-rw-r--r-- | src/misc_gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 797273af0..e6d9ad0c0 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -553,7 +553,7 @@ public: this->detailed_msg = detailed_msg; CompanyID company = (CompanyID)GetDParamX(this->decode_params, 2); - this->face = (this->detailed_msg == STR_ERROR_OWNED_BY && company <= MAX_COMPANIES) ? company : INVALID_COMPANY; + this->face = (this->detailed_msg == STR_ERROR_OWNED_BY && company < MAX_COMPANIES) ? company : INVALID_COMPANY; const WindowDesc *desc = (face == INVALID_COMPANY) ? &_errmsg_desc : &_errmsg_face_desc; assert(summary_msg != INVALID_STRING_ID); |