Skip to content

Commit c6a52ff

Browse files
committed
format ID depends on ID type
1 parent 6622d9d commit c6a52ff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/event_handler/debug.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ impl<'a> DebugHandler<'a> {
6060
Local::now().to_string().replace('"', "").to_string(),
6161
),
6262
data: SharedString::from(format!("{:?}", frame.data())),
63-
id: SharedString::from(format!("0x{:08X}", frame_id)),
63+
id: if frame.is_extended() {
64+
SharedString::from(format!("0x{:08X}", frame_id))
65+
} else {
66+
SharedString::from(format!("0x{:03X}", frame_id))
67+
},
6468
#[cfg(target_os = "linux")]
6569
len: frame.len() as i32,
6670
#[cfg(target_os = "windows")]

0 commit comments

Comments
 (0)