Compare commits

...

2 Commits

Author SHA1 Message Date
8e87a8df3b Merge pull request 'append null to avoid message artifacts' (#9) from small_dialog into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #9
Reviewed-by: jake <jake@sharnoth.com>
2021-06-22 22:14:25 -04:00
faab6e8fd6 append null to avoid message artifacts
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2021-06-22 23:22:41 +00:00

View File

@ -274,7 +274,10 @@ pub struct SmallDialog {
}
impl SmallDialog {
pub fn new(msg: String) -> SmallDialog {
pub fn new(mut msg: String) -> SmallDialog {
if !msg.ends_with('\0') {
msg.push('\0');
}
SmallDialog {
padding: [0; 0x02],
msg: msg,