Skip to content

Commit 53f2510

Browse files
committed
Auto merge of #43 - lucasbrendel:master, r=japaric
Changing parse for '#' replace to match for both 'X' and 'x' This was found while testing other infineon XMC SVD files. From what i could tell, this should be allowed with the SVD schema, but correct me if this is allowing another edge case
2 parents 5dc1f2d + fd1ce6a commit 53f2510

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub fn u32(tree: &Element) -> Option<u32> {
99
// Handle strings in the binary form of:
1010
// #01101x1
1111
// along with don't care character x (replaced with 0)
12-
u32::from_str_radix(&str::replace(&text["#".len()..], "x", "0"), 2).ok()
12+
u32::from_str_radix(&str::replace(&text.to_lowercase()["#".len()..], "x", "0"), 2).ok()
1313
} else if text.starts_with("0b"){
1414
// Handle strings in the binary form of:
1515
// 0b01101x1

0 commit comments

Comments
 (0)