1
0
Fork 0

Fix bb491127: Missing braces prevented vehicles turning properly.

pull/11816/head
Peter Nelson 2024-01-17 12:51:28 +00:00
parent fd0528a9b4
commit 2485e4ef77
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ inline DirDiff DirDifference(Direction d0, Direction d1)
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<DirDiff>(static_cast<uint>(d0) - static_cast<uint>(d1) % 8);
return static_cast<DirDiff>((static_cast<uint>(d0) - static_cast<uint>(d1)) % 8);
}
/**