[lss] fix issue with crumbs

This commit is contained in:
Tim Stack 2022-08-11 08:55:59 -07:00
parent 1c440ecb6f
commit 1e63cfc5ae
2 changed files with 5 additions and 2 deletions

View File

@ -119,7 +119,10 @@ struct string_fragment {
{
}
bool is_valid() const { return this->sf_begin != -1; }
bool is_valid() const
{
return this->sf_begin != -1 && this->sf_begin <= this->sf_end;
}
int length() const { return this->sf_end - this->sf_begin; }

View File

@ -2180,9 +2180,9 @@ logfile_sub_source::text_crumbs_for_line(int line,
logline_value_vector values;
auto& sbr = values.lvv_sbr;
attr_line_t al(to_string(sbr));
lf->read_full_message(msg_start_iter, sbr);
attr_line_t al(to_string(sbr));
format->annotate(file_line_number, al.get_attrs(), values);
auto opid_opt = get_string_attr(al.get_attrs(), logline::L_OPID);