Skip to content

Commit

Permalink
Fix out of bounds error
Browse files Browse the repository at this point in the history
  • Loading branch information
ShootMe committed Sep 24, 2017
1 parent 2cf35b3 commit c817497
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CSV.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public static DataTable ToDataTable(string data, char delimiter = ',', bool hasH
field.Length = 0;
if (d == delimiter) {
if (f == dt.Columns.Count) {
throw new Exception("Found too many columns on data row " + dt.Rows.Count + 1 + ".");
throw new Exception("Found too many columns on data row " + (dt.Rows.Count + 1) + ".");
} else if (end) {
row[f++] = string.Empty;
}
Expand Down
2 changes: 1 addition & 1 deletion MiniMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ protected override void OnMouseMove(MouseEventArgs e) {
}
}

if (cellX != lastCellPosition.X || cellY != lastCellPosition.Y) {
if ((cellX != lastCellPosition.X || cellY != lastCellPosition.Y) && cellX >= 0 && cellY >= 0) {
lastCellPosition = new Point(cellX, cellY);
MiniMapCell hoverCell = cells[cellY, cellX];
HoverOverCell?.Invoke(this, hoverCell);
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("b3294e28-2bd4-4e39-92fa-e04a620c7e77")]
[assembly: AssemblyVersion("1.4.5.0")]
[assembly: AssemblyFileVersion("1.4.5.0")]
[assembly: AssemblyVersion("1.4.6.0")]
[assembly: AssemblyFileVersion("1.4.6.0")]

0 comments on commit c817497

Please sign in to comment.