fix bugs in some debuggerPageSize cases

This commit is contained in:
zeromus 2014-02-05 20:02:20 +00:00
parent 1c069a8c83
commit 86d663102e
1 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@
int GetNesFileAddress(int A); int GetNesFileAddress(int A);
inline int PageIndexForAddress(int addr) { return addr>>(9+debuggerPageSize); } inline int RomPageIndexForAddress(int addr) { return (addr-0x8000)>>(debuggerPageSize); }
//old //old
//Name* lastBankNames = 0; //Name* lastBankNames = 0;
@ -562,7 +562,7 @@ Name* getNamesPointerForAddress(uint16 address)
{ {
if(address >= 0x8000) if(address >= 0x8000)
{ {
return pageNames[PageIndexForAddress(address)]; return pageNames[RomPageIndexForAddress(address)];
} }
else else
{ {
@ -573,7 +573,7 @@ void setNamesPointerForAddress(uint16 address, Name* newNode)
{ {
if (address >= 0x8000) if (address >= 0x8000)
{ {
pageNames[PageIndexForAddress(address)] = newNode; pageNames[RomPageIndexForAddress(address)] = newNode;
} }
else else
{ {