From 7fe24575f1be891681143be932522a6202225248 Mon Sep 17 00:00:00 2001 From: Henry Schimke Date: Mon, 9 Jan 2023 17:43:08 -0600 Subject: [PATCH] bitmatrix parse should use chars and not len --- src/common/bit_matrix.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/bit_matrix.rs b/src/common/bit_matrix.rs index 346ddbf..7be18bd 100644 --- a/src/common/bit_matrix.rs +++ b/src/common/bit_matrix.rs @@ -126,7 +126,7 @@ impl BitMatrix { // throw new IllegalArgumentException(); // } - let mut bits = vec![false; string_representation.len()]; + let mut bits = vec![false; string_representation.chars().count()]; let mut bitsPos = 0; let mut rowStartPos = 0; let mut rowLength = 0; //-1;