The International Simutrans Forum

Simutrans Extended => Patches/pull requests for consideration => Simutrans-Extended development => Incorporated patches/merged pull requests => Topic started by: neroden on June 04, 2024, 02:54:21 PM

Title: Restore integer overflow check to karte_t::step
Post by: neroden on June 04, 2024, 02:54:21 PM
This is on the (misnamed) sync-cleanups branch.  This resynchronizes with Standard.  There was no reason to remove the integer overflow check; overflow checks are good; they are cheap computationally.  We may at some point have large ticks_per_month values and very long games and may risk overflowing sint64; there is no harm in leaving a check in place and potential harm in commenting it out.
Title: Re: Restore integer overflow check to karte_t::step
Post by: jamespetts on June 04, 2024, 09:21:00 PM
Quote from: neroden on June 04, 2024, 02:54:21 PMThis is on the (misnamed) sync-cleanups branch.  This resynchronizes with Standard.  There was no reason to remove the integer overflow check; overflow checks are good; they are cheap computationally.  We may at some point have large ticks_per_month values and very long games and may risk overflowing sint64; there is no harm in leaving a check in place and potential harm in commenting it out.
Thank you - now incorporated.