diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-01-22 12:48:37 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-01-22 12:48:37 +0000 |
commit | aefb2153a88a11cce249f709e10a19ad8d8d39fd (patch) | |
tree | 9cd1c1dec9fd26fd9fe0d273485dce86f93b3feb /src/client/rspamc.cxx | |
parent | 4043939da9cb74e9bb11902490133e1812588c05 (diff) | |
download | rspamd-aefb2153a88a11cce249f709e10a19ad8d8d39fd.tar.gz rspamd-aefb2153a88a11cce249f709e10a19ad8d8d39fd.zip |
[Minor] Check the last split when wrapping
Reported by: @amishmm
Diffstat (limited to 'src/client/rspamc.cxx')
-rw-r--r-- | src/client/rspamc.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/rspamc.cxx b/src/client/rspamc.cxx index c757000db..a2bf4c783 100644 --- a/src/client/rspamc.cxx +++ b/src/client/rspamc.cxx @@ -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; } } |