From 2816521f0d56ac6869454b7e8369971e0b6cc8d7 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Sat, 11 Oct 2014 15:02:22 -0500 Subject: base: addr range: slight change to validity check The validity check is being changed from < to <= since the end of the range is considered to be a part of it. --- src/base/addr_range.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/base/addr_range.hh b/src/base/addr_range.hh index 7f275e5a9..df4afab9e 100644 --- a/src/base/addr_range.hh +++ b/src/base/addr_range.hh @@ -58,6 +58,7 @@ class AddrRange private: /// Private fields for the start and end of the range + /// Both _start and _end are part of the range. Addr _start; Addr _end; @@ -166,7 +167,7 @@ class AddrRange /** * Determine if the range is valid. */ - bool valid() const { return _start < _end; } + bool valid() const { return _start <= _end; } /** * Get the start address of the range. -- cgit v1.2.3