Skip to content

Commit

Permalink
Fix sfr address check
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgoe committed Apr 9, 2022
1 parent 6bef8c1 commit 88b76d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sim8051/src/Processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ u8 &Processor::direct_acc( u8 addr ) {
if ( addr < 0x80 ) {
return iram[addr];
} else {
if ( std::find( valid_sfr_addresses.begin(), valid_sfr_addresses.end(), addr ) ) {
if ( std::find( valid_sfr_addresses.begin(), valid_sfr_addresses.end(), addr ) != valid_sfr_addresses.end() ) {
return sfr[addr - 0x80];
} else {
log( "Invalid access to sfr at address " + to_string( addr ) + ", PC: " + to_string( pc ) );
Expand Down

0 comments on commit 88b76d2

Please sign in to comment.