From e08e021a6cddf2b291cce4b06ad8d0a62b10a0d3 Mon Sep 17 00:00:00 2001 From: sevenc-nanashi Date: Fri, 31 May 2024 18:51:39 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20Recotte=20studio=E3=81=AB=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/cantari/src/main.rs | 2 +- crates/cantari/src/ongen.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/cantari/src/main.rs b/crates/cantari/src/main.rs index 99f6764..8a8c16b 100644 --- a/crates/cantari/src/main.rs +++ b/crates/cantari/src/main.rs @@ -118,7 +118,7 @@ async fn main_impl(args: Cli) -> Result<()> { { let ongens = ONGEN.get().unwrap().read().await; for ongen in ongens.values() { - info!("- {} ({})", ongen.name(), ongen.uuid); + info!("- {} ({}, {})", ongen.name(), ongen.uuid, ongen.id()); } } diff --git a/crates/cantari/src/ongen.rs b/crates/cantari/src/ongen.rs index d780ac7..5ab65ac 100644 --- a/crates/cantari/src/ongen.rs +++ b/crates/cantari/src/ongen.rs @@ -112,7 +112,7 @@ impl Ongen { pub fn id(&self) -> u32 { let uuid_string = self.uuid.to_string(); let uuid_first_section = uuid_string.split('-').next().unwrap(); - u32::from_str_radix(uuid_first_section, 16).unwrap() & !(0xffu32) + (u32::from_str_radix(uuid_first_section, 16).unwrap() >> 1) & !(0xffu32) } pub async fn read_image(&self) -> Option> {