Browse Source

Merge pull request 'append null to avoid message artifacts' (#9) from small_dialog into master

Reviewed-on: #9
Reviewed-by: jake <jake@sharnoth.com>
pull/10/head
jake 3 years ago
parent
commit
8e87a8df3b
  1. 5
      src/packet/ship.rs

5
src/packet/ship.rs

@ -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,

Loading…
Cancel
Save