From 1cb492d90a208cdaa677e6ad834c414f8ee3c653 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Thu, 1 Feb 2024 23:27:28 +0100 Subject: [PATCH] fix line skip counter #1 --- src/dumper.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dumper.rs b/src/dumper.rs index 3a8ba7d..2beb388 100644 --- a/src/dumper.rs +++ b/src/dumper.rs @@ -2,7 +2,7 @@ use std::io::{prelude::*, Read, SeekFrom}; -use anyhow::{bail, Result}; +use anyhow::Result; use libpt::bintols::display::humanbytes; use libpt::log::{debug, error, trace, warn}; @@ -137,7 +137,7 @@ impl Hedu { "******** {LINE_SEP_VERT} {:<49}", format!( "(repeats {} lines)", - self.data_idx - start_line / (BYTES_PER_LINE) + 1 + (self.data_idx - start_line / (BYTES_PER_LINE) + 1) / BYTES_PER_LINE ) ); if self.chars { @@ -206,6 +206,8 @@ impl Hedu { self.display(); Ok(()) } + + /// adjust the counters of the hedu struct, adding self.len #[inline] fn adjust_counters(&mut self) { self.rd_counter += self.len;