aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-21 15:13:27 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-21 15:13:27 +0100
commit23b52c3eb70ba4a81d0eb84e7a1b4812027f1035 (patch)
tree716e4fdff2a010a355c5180d980d144a18a66c8c
parentf06db7c896b340d3862cfa4417d08256ae36f33f (diff)
downloadrspamd-23b52c3eb70ba4a81d0eb84e7a1b4812027f1035.tar.gz
rspamd-23b52c3eb70ba4a81d0eb84e7a1b4812027f1035.zip
[Minor] Fix one more corner case
-rw-r--r--src/libserver/html/html.cxx3
1 files changed, 2 insertions, 1 deletions
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 += ' ';
}