mirror of
https://github.com/zoriya/ComSquare.git
synced 2025-12-19 21:55:11 +00:00
Solving a bug with the Rectangle memory
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// Created by anonymus-raccoon on 1/29/20.
|
||||
//
|
||||
|
||||
#include <iostream>
|
||||
#include "IRectangleMemory.hpp"
|
||||
#include "../Exceptions/InvalidAddress.hpp"
|
||||
|
||||
@@ -44,8 +45,8 @@ namespace ComSquare::Memory
|
||||
uint8_t bank = addr >> 16u;
|
||||
uint16_t page = addr;
|
||||
|
||||
if (this->_startBank <= bank && bank < this->_endBank)
|
||||
if (this->_startPage <= page && page < this->_endPage)
|
||||
if (this->_startBank <= bank && bank <= this->_endBank)
|
||||
if (this->_startPage <= page && page <= this->_endPage)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user