From: Vsevolod Stakhov Date: Wed, 21 Jul 2021 14:13:27 +0000 (+0100) Subject: [Minor] Fix one more corner case X-Git-Tag: 3.0~120 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=23b52c3eb70ba4a81d0eb84e7a1b4812027f1035;p=rspamd.git [Minor] Fix one more corner case --- diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx index d60210ba6..6cf3b959d 100644 --- a/src/libserver/html/html.cxx +++ b/src/libserver/html/html.cxx @@ -1191,9 +1191,10 @@ html_append_tag_content(rspamd_mempool_t *pool, /* Add a space */ hc->parsed += ' '; } + hc->parsed.append(maybe_alt.value()); - if (!g_ascii_isspace (hc->parsed.back())) { + if (!hc->parsed.empty() && !g_ascii_isspace (hc->parsed.back())) { /* Add a space */ hc->parsed += ' '; }