Hex Editor - fix bug that was causing it to draw 1 row beyond the memory domain if scroll bar was maxed

This commit is contained in:
andres.delikat 2011-08-21 23:42:12 +00:00
parent cdb79b2143
commit 6cc75ae98e
1 changed files with 3 additions and 2 deletions

View File

@ -209,6 +209,8 @@ namespace BizHawk.MultiClient
for (int i = 0; i < RowsVisible; i++)
{
row = i + vScrollBar1.Value;
if (row * 16 >= Domain.Size)
break;
rowStr.AppendFormat("{0:X" + NumDigits + "} ", row * 16);
switch (DataSize)
{
@ -257,8 +259,7 @@ namespace BizHawk.MultiClient
break;
}
if (row * 16 >= Domain.Size)
break;
}
e.Graphics.DrawString(rowStr.ToString(), font, Brushes.Black, new Point(rowX, rowY));
}