Skip to content

Commit

Permalink
Fix off-by-one in GetStartblockForBank
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Rettberg committed Nov 5, 2018
1 parent fb9b06e commit 821c821
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ uchar XbitFlasher::CalculateBlockIndexForOffset(int offset)
int XbitFlasher::GetStartblockForBank(int layout, int bank)
{
int offset = 0;
for(int i=1; i <= bank; i++){
for(int i=1; i < bank; i++){
offset += GetSizeForBank(layout, i);
}
return CalculateBlockIndexForOffset(offset);
Expand Down

0 comments on commit 821c821

Please sign in to comment.