From a232ef4d062b1f7d00fe204f91532947615bf37e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20S=C3=A1ez?= Date: Wed, 19 Mar 2025 19:04:21 +0100 Subject: [PATCH] Fix boundary to respect logical priorities --- Inc/ST-LIB_HIGH/Protections/Boundary.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inc/ST-LIB_HIGH/Protections/Boundary.hpp b/Inc/ST-LIB_HIGH/Protections/Boundary.hpp index 5ccff8682..1754a8af7 100644 --- a/Inc/ST-LIB_HIGH/Protections/Boundary.hpp +++ b/Inc/ST-LIB_HIGH/Protections/Boundary.hpp @@ -260,7 +260,7 @@ struct Boundary : public BoundaryInterface{ Boundary(Type* src, Type lower_boundary, Type upper_boundary): src(src), lower_boundary(lower_boundary), upper_boundary(upper_boundary){} Protections::FaultType check_bounds()override{ if(*src < lower_boundary || *src > upper_boundary) return Protections::FAULT; - if(has_warning_level && *src < lower_boundary || *src > upper_boundary){ + if(has_warning_level && ((*src < lower_boundary) || (*src > upper_boundary))){ return Protections::WARNING; } return Protections::OK;