Could you please attach patch file? Or is this fix in your git repo?JGR wrote:I've implemented a fix for this which will be in the next release.
Yup, I'm a lucky man! When I've compiled ottd with full optimization, I've found another little but, but this time in compiler, in MS VC++ compiler! It just ignored "value == 0 ? last_value : " part and compiled only "last_value / value". I've found this by inspecting asm code; nothing like "cmp" nor "je/jne", only "div".JGR wrote:Interestingly this bug is in trunk and can be triggered by using the same GRF list as in your savegame.
Upd.: yeah, clipboard brokes transportaion. Trains loading only by half, they ignore other freight, cargodist is in panic, timetables going mad, freight isn't removed from station after it's loaded to transport. Dunno, maybe I'll try to rewrite it to be less invasive. What's so hard in copying chunk of map anyway? As I see it, it's just create a buffer, copy map data into it (maybe exclude something like town buildings, industry, trees, etc), and then rebuild tile by tile starting from given tileindex and using cmd's to calculate price.