Skip to content

Commit

Permalink
fully parenthesizes complex expressions.
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsracz committed Aug 27, 2020
1 parent a845f8d commit 9aa5577
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/openlcb/VirtualMemorySpace.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public:
size_t write(address_t destination, const uint8_t *data, size_t len,
errorcode_t *error, Notifiable *again) override
{
if (destination > maxAddress_ || destination + len <= minAddress_)
if ((destination > maxAddress_) || ((destination + len) <= minAddress_))
{
*error = MemoryConfigDefs::ERROR_OUT_OF_BOUNDS;
return 0;
Expand Down Expand Up @@ -129,7 +129,7 @@ public:
size_t read(address_t source, uint8_t *dst, size_t len, errorcode_t *error,
Notifiable *again) override
{
if (source > maxAddress_ || source + len <= minAddress_)
if ((source > maxAddress_) || ((source + len) <= minAddress_))
{
*error = MemoryConfigDefs::ERROR_OUT_OF_BOUNDS;
return 0;
Expand Down

0 comments on commit 9aa5577

Please sign in to comment.