mirror of https://github.com/ARMmbed/mbed-os.git
Fix function is_in_wrapped_range, the function where returning false when
instead of true when begin <= val < end. The documentation was correct but not the code.pull/1897/head
parent
9714a0edf6
commit
6315f8e486
|
@ -462,9 +462,9 @@ static inline bool is_in_wrapped_range(uint32_t begin, uint32_t end, uint32_t va
|
|||
// return true if begin <= val < end
|
||||
if (begin < end) {
|
||||
if (begin <= val && val < end) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// In this case end < begin because it has wrap around the limits
|
||||
|
|
Loading…
Reference in New Issue