From 6810d09c1bd699881be3297bcea684187f3edbf0 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sat, 9 Jul 2022 10:03:41 +0200 Subject: [PATCH] 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. --- src/direction_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/direction_type.h b/src/direction_type.h index 55e430e8cd..f025d113e7 100644 --- a/src/direction_type.h +++ b/src/direction_type.h @@ -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