Skip to content

Commit b5976c1

Browse files
fix(DataTable)-77: Index out of bounds (#78)
Changes: - When indexing DataTable, it needs to be within the bounds.
1 parent ee71db7 commit b5976c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/object.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl MLineStyleElement {
6262
//------------------------------------------------------------------------------
6363
impl DataTable {
6464
pub(crate) fn set_value(&mut self, row: usize, col: usize, val: DataTableValue) {
65-
if row <= self.row_count && col <= self.column_count {
65+
if row < self.row_count && col < self.column_count {
6666
self.values[row][col] = Some(val);
6767
}
6868
}

0 commit comments

Comments
 (0)