From 70e5655006fb81d6d8f9970cf34bcf4c24a43047 Mon Sep 17 00:00:00 2001 From: Dennis Jensen Date: Sun, 3 Nov 2024 19:41:11 +0100 Subject: [PATCH] fix(DataTable)-77: Index out of bounds Changes: - When indexing DataTable, it needs to be within the bounds. --- src/object.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/object.rs b/src/object.rs index 13a8fcc..d4e01de 100644 --- a/src/object.rs +++ b/src/object.rs @@ -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); } }