Browse Source

[Minor] Check the last split when wrapping

Reported by: @amishmm
tags/3.5
Vsevolod Stakhov 1 year ago
parent
commit
aefb2153a8
No account linked to committer's email address
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      src/client/rspamc.cxx

+ 4
- 0
src/client/rspamc.cxx View File

@@ -847,6 +847,10 @@ rspamc_print_indented_line(FILE *out, std::string_view line) -> void
suffix = suffix.substr(delim_pos + 1);
}
else {
/* Check if we can include one last word */
if (delim_pos == std::string_view::npos && word_len + suffix.size() < split_len) {
word_len += suffix.size();
}
break;
}
}

Loading…
Cancel
Save