mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-10 08:00:05 +00:00
Fix: commands with Axis in their arguments were not validated properly (#9943)
When you don't type an Enum, it is a signed value. To validate if an Axis is valid, it is checked to be lower than AXIS_END. Which is the case for any value below 0.
This commit is contained in:
parent
dd93244853
commit
6810d09c1b
@ -120,7 +120,7 @@ DECLARE_POSTFIX_INCREMENT(DiagDirDiff)
|
||||
* (and south-east edge). The Y axis must be so the one which goes
|
||||
* align the north-east edge (and south-west) edge.
|
||||
*/
|
||||
enum Axis {
|
||||
enum Axis : byte {
|
||||
AXIS_X = 0, ///< The X axis
|
||||
AXIS_Y = 1, ///< The y axis
|
||||
AXIS_END, ///< Used for iterations
|
||||
|
Loading…
Reference in New Issue
Block a user