From 1d2028959d06585fe726dded9e3f3b7bde425639 Mon Sep 17 00:00:00 2001 From: Emilia Date: Sun, 12 Jan 2025 14:59:14 -0500 Subject: [PATCH] lib fix: swapped row/col on parse string --- plate-tool-lib/src/transfer_region.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plate-tool-lib/src/transfer_region.rs b/plate-tool-lib/src/transfer_region.rs index b7e60d0..e33a264 100644 --- a/plate-tool-lib/src/transfer_region.rs +++ b/plate-tool-lib/src/transfer_region.rs @@ -101,7 +101,7 @@ impl Region { log::info!("{:?}", input); if let Some(captures) = RECT_REGEX.captures(input) { - if let (Some(row1), Some(col1), Some(row2), Some(col2)) = ( + if let (Some(col1), Some(row1), Some(col2), Some(row2)) = ( crate::util::letters_to_num(&captures[1]), captures[2].parse::().ok(), crate::util::letters_to_num(&captures[3]), @@ -121,7 +121,7 @@ impl Region { return None; } } else if let Some(captures) = POINT_REGEX.captures(input) { - if let (Some(row), Some(col)) = ( + if let (Some(col), Some(row)) = ( crate::util::letters_to_num(&captures[1]), captures[2].parse::().ok(), ) { @@ -461,7 +461,6 @@ impl TransferRegion { return Err("Source region is out-of-bounds! (Too tall)"); } if (s1.col > source_max.1 || s2.col > source_max.1) && il_dest.1 != 0 { - // log::debug!("s1.1: {}, max.1: {}", s1.1, source_max.1); return Err("Source region is out-of-bounds! (Too wide)"); }