Skip to content

Commit

Permalink
Fix erraneous vector use
Browse files Browse the repository at this point in the history
Wrong subtrahend caused out-of-bound memory access
  • Loading branch information
amhndu committed Oct 16, 2016
1 parent eb205f4 commit 5e39d3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MainBus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ namespace sn
{
if (m_mapper->hasExtendedRAM())
{
m_extRAM[addr - 0x8000] = value;
m_extRAM[addr - 0x6000] = value;
}
}
else
Expand All @@ -120,7 +120,7 @@ namespace sn
{
if (m_mapper->hasExtendedRAM())
{
return &m_extRAM[addr - 0x8000];
return &m_extRAM[addr - 0x6000];
}
}
else
Expand Down

0 comments on commit 5e39d3f

Please sign in to comment.