]> git.huck.website - cellseq.git/commitdiff
fixed: u8 overflow in hit counter
authorHuck Boles <huck@huck.website>
Mon, 10 Jul 2023 23:41:33 +0000 (18:41 -0500)
committerHuck Boles <huck@huck.website>
Mon, 10 Jul 2023 23:41:33 +0000 (18:41 -0500)
src/mask.rs

index 0ff91eade94fd32c71d73621860a20c9088a60ad..11e9f245b21fb45333fda807d46a418c3e118d97 100644 (file)
@@ -68,7 +68,8 @@ impl Mask {
                 self.hits.insert(*cell);
             }
         }
-        self.hits.len().try_into().unwrap_or_default()
+
+        self.hits.len().try_into().unwrap_or(127)
     }
 
     pub fn randomize(&mut self) {