mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-11 21:48:36 +00:00
Concat NUL terminator to dynamic strings before format
This commit is contained in:
parent
3c88d70a74
commit
0061a209b6
@ -76,7 +76,10 @@ macro_rules! im_str {
|
||||
}
|
||||
});
|
||||
($e:tt, $($arg:tt)*) => ({
|
||||
&::imgui::ImString::new(format!($e, $($arg)*))
|
||||
unsafe {
|
||||
&::imgui::ImString::from_utf8_with_nul_unchecked(
|
||||
format!(concat!($e, "\0"), $($arg)*).into_bytes())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user