diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-08-15 14:17:21 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2023-08-15 14:17:21 +0200 |
commit | 0b1041a87a8e349833ab85cda028fa6626713f83 (patch) | |
tree | cf1fd473dd0fb5071b3634a0301ef399b929b334 | |
parent | 972579fa42e8af42dc75d454fec93b54f337dc58 (diff) |
ignore sector math
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 411d933..bcb0c1c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -285,9 +285,7 @@ fn modify_cmdline(old: &str, new: &str) -> Result<()> { let cmdline_offset = buf .windows(cmdline_buf.len()) .position(|window| window == cmdline_buf) - .ok_or(Error::NoCmdline)? - / 512 - + 1; + .ok_or(Error::NoCmdline)?; replace_slice( &mut buf[cmdline_offset..cmdline_offset + cmdline_buf.len()], |