lib fix: swapped row/col on parse string
This commit is contained in:
parent
26526bb249
commit
1d2028959d
|
@ -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::<u8>().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::<u8>().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)");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue