Skip to content

Commit

Permalink
Merge pull request #109 from pamburus/feature/prefix
Browse files Browse the repository at this point in the history
fix: Fixed corrupted output in prefix mode
  • Loading branch information
pamburus authored Dec 16, 2023
2 parents 2069700 + 438f8b5 commit f0b51ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ categories = ["command-line-utilities"]
description = "Utility for viewing json-formatted log files."
keywords = ["cli", "human", "log"]
name = "hl"
version = "0.23.0"
version = "0.23.1-beta.1"
edition = "2021"
build = "build.rs"

Expand Down
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ impl<'a, F: RecordWithSourceFormatter> SegmentProcessor<'a, F> {
if record.matches(self.filter) {
let begin = buf.len();
buf.extend(prefix.as_bytes());
self.formatter.format_record(buf, record.with_source(&data[offsets]));
self.formatter.format_record(buf, record.with_source(&data[offsets.start..xn+offsets.end]));
let end = buf.len();
observer.observe_record(&record, begin..end);
}
Expand Down

0 comments on commit f0b51ad

Please sign in to comment.