Skip to content

Commit

Permalink
fix(DataTable)-77: Index out of bounds (#78)
Browse files Browse the repository at this point in the history
Changes:
- When indexing DataTable, it needs to be within the bounds.
  • Loading branch information
DennisJensen95 authored Nov 8, 2024
1 parent ee71db7 commit b5976c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl MLineStyleElement {
//------------------------------------------------------------------------------
impl DataTable {
pub(crate) fn set_value(&mut self, row: usize, col: usize, val: DataTableValue) {
if row <= self.row_count && col <= self.column_count {
if row < self.row_count && col < self.column_count {
self.values[row][col] = Some(val);
}
}
Expand Down

0 comments on commit b5976c1

Please sign in to comment.