aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs
index 411d933..f72da42 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -289,11 +289,7 @@ fn modify_cmdline(old: &str, new: &str) -> Result<()> {
/ 512
+ 1;
- replace_slice(
- &mut buf[cmdline_offset..cmdline_offset + cmdline_buf.len()],
- old.as_bytes(),
- new.as_bytes(),
- );
+ replace_slice(&mut buf[cmdline_offset..], old.as_bytes(), new.as_bytes());
fs::write(boot, buf)?;
nix::unistd::sync();