Corrected size() function in TargetMemoryDescriptor scruct.

This was hiding the issue with incorrect end addresses in AVR8 memory descriptors
This commit is contained in:
Nav
2021-12-24 14:35:11 +00:00
parent a0ef9051ba
commit c665215d69

View File

@@ -38,8 +38,8 @@ namespace Bloom::Targets
TargetMemoryDescriptor(TargetMemoryType type, TargetMemoryAddressRange addressRange)
: type(type), addressRange(addressRange) {};
std::uint32_t size() const {
return this->addressRange.endAddress - this->addressRange.startAddress;
[[nodiscard]] std::uint32_t size() const {
return (this->addressRange.endAddress - this->addressRange.startAddress) + 1;
}
};