diff --git a/agb-addr2line/src/gwilym_encoding.rs b/agb-addr2line/src/gwilym_encoding.rs index fca9896c..16c83878 100644 --- a/agb-addr2line/src/gwilym_encoding.rs +++ b/agb-addr2line/src/gwilym_encoding.rs @@ -34,6 +34,10 @@ pub struct GwilymDecodeIter<'a> { impl<'a> GwilymDecodeIter<'a> { fn new(input: &'a str) -> anyhow::Result { + let input = input + .strip_prefix("https://agbrs.dev/crash#") + .unwrap_or(input); + let Some((input, version)) = input.rsplit_once('v') else { anyhow::bail!("Does not contain version"); }; @@ -161,4 +165,14 @@ mod test { Ok(()) } + + #[test] + fn should_strip_the_agbrsdev_prefix() -> anyhow::Result<()> { + assert_eq!( + &gwilym_decode("https://agbrs.dev/crash#2QI65Q69306Kv1")?.collect::>(), + &[0x0800_16d3, 0x0800_315b, 0x0800_3243, 0x0800_0195] + ); + + Ok(()) + } }