# HG changeset patch # User Peter Nelson # Date 2024-01-17 13:23:55 # Node ID 194cf9742d385352ad734fc5f08311fc3f87c687 # Parent 36520b9343948befad8d7f4dcd8461166d2238b5 Fix #11815, bb491127: Missing brackets prevented vehicles turning properly. (#11816) diff --git a/src/direction_func.h b/src/direction_func.h --- a/src/direction_func.h +++ b/src/direction_func.h @@ -71,7 +71,7 @@ inline DirDiff DirDifference(Direction d assert(IsValidDirection(d1)); /* Cast to uint so compiler can use bitmask. If the difference is negative * and we used int instead of uint, further "+ 8" would have to be added. */ - return static_cast(static_cast(d0) - static_cast(d1) % 8); + return static_cast((static_cast(d0) - static_cast(d1)) % 8); } /**