Skip to content

Commit ce53a8a

Browse files
authored
Fix boundary to respect logical priorities (#499)
1 parent 5560a7b commit ce53a8a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Inc/ST-LIB_HIGH/Protections/Boundary.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ struct Boundary<Type, OUT_OF_RANGE> : public BoundaryInterface{
260260
Boundary(Type* src, Type lower_boundary, Type upper_boundary): src(src), lower_boundary(lower_boundary), upper_boundary(upper_boundary){}
261261
Protections::FaultType check_bounds()override{
262262
if(*src < lower_boundary || *src > upper_boundary) return Protections::FAULT;
263-
if(has_warning_level && *src < lower_boundary || *src > upper_boundary){
263+
if(has_warning_level && ((*src < lower_boundary) || (*src > upper_boundary))){
264264
return Protections::WARNING;
265265
}
266266
return Protections::OK;

0 commit comments

Comments
 (0)