diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/industry_gui.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index f55a896e2..fe26676be 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -885,8 +885,9 @@ public: if (StrEmpty(str)) return; Industry *i = Industry::Get(this->window_number); + uint value = atoi(str); - i->production_rate[this->editbox_line - IL_RATE1] = ClampU(atoi(str) / 8, 0, 255); + i->production_rate[this->editbox_line - IL_RATE1] = ClampU(RoundDivSU(value, 8), 0, 255); UpdateIndustryProduction(i); this->SetDirty(); } |