mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
fix off-by-one arg error on Dna routine
this is a common api problem because yes, while arg1 is strictly the second item, previously arg0 was hidden and in the argument list arg1 took the first place not the second. so i make this mistake a lot...
This commit is contained in:
parent
0cb80c2afb
commit
34a1a33165
1 changed files with 5 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ impl Keystore {
|
|||
Message::new_blocking_scalar(Opcode::GetDna.to_usize().unwrap(), 0, 0, 0, 0),
|
||||
)
|
||||
.unwrap();
|
||||
if let xous::Result::Scalar5(val1, val2, _, _, _) = response {
|
||||
if let xous::Result::Scalar5(_, val1, val2, _, _) = response {
|
||||
(val1 as u64) | ((val2 as u64) << 32)
|
||||
} else {
|
||||
panic!("get_dna() failed with internal error");
|
||||
|
|
@ -71,7 +71,10 @@ impl Keystore {
|
|||
self.conn,
|
||||
Message::new_blocking_scalar(Opcode::EnsurePassword.to_usize().unwrap(), 0, 0, 0, 0),
|
||||
) {
|
||||
Ok(xous::Result::Scalar5(arg1, arg2, arg3, _arg4, _arg5)) => (arg1, arg2, arg3).into(),
|
||||
Ok(xous::Result::Scalar5(_arg0, arg1, arg2, arg3, _arg4)) => {
|
||||
log::info!("got {:x}, {:x}, {:x}", arg1, arg2, arg3);
|
||||
(arg1, arg2, arg3).into()
|
||||
}
|
||||
_ => panic!("ensure_password() failed with internal error"),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue