diff --git a/ctru-rs/src/applets/mii_selector.rs b/ctru-rs/src/applets/mii_selector.rs index a54729a..599a480 100644 --- a/ctru-rs/src/applets/mii_selector.rs +++ b/ctru-rs/src/applets/mii_selector.rs @@ -127,8 +127,10 @@ impl MiiSelectorReturn { pub fn author(&self) -> String { let mut tmp = [0u8; 30]; - unsafe { ctru_sys::miiSelectorReturnGetName(self.raw_return.as_ref(), tmp.as_mut_ptr(), 30) } - let utf8 = unsafe { std::str::from_utf8_unchecked(&tmp) }; + unsafe { ctru_sys::miiSelectorReturnGetAuthor(self.raw_return.as_ref(), tmp.as_mut_ptr(), 30) } + + let len = unsafe { libc::strlen(tmp.as_ptr()) }; + let utf8 = unsafe { std::str::from_utf8_unchecked(&tmp[..len]) }; utf8.to_owned() } @@ -163,4 +165,10 @@ impl From> for MiiSelectorReturn { checksum, } } +} + +impl From for MiiConfigIndex { + fn from(v: u32) -> Self { + Self::Index(v) + } } \ No newline at end of file