From 03b2d43c6ce32f75267e66f0f2ce9928ba073898 Mon Sep 17 00:00:00 2001 From: Kiyomichi Kosaka Date: Thu, 22 Dec 2022 12:10:13 +0000 Subject: [PATCH] Fix generation of single random passwords. --- src/commands.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands.rs b/src/commands.rs index 0d47cb9..44daf7c 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -434,7 +434,7 @@ impl<'a> LKEval<'a> { genpwds.push((npwd, pass)); } } else { - let name = gen.trim_end_matches('X'); + let name = pwd.name.trim_end_matches('X'); let num = rng.gen_range(1..10_u32.pow(gen.len().try_into().unwrap())); let npwd = Password::from_password(&pwd); npwd.borrow_mut().name = Rc::new(format!("{}{}", name, num).to_string());