]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix one more corner case
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 21 Jul 2021 14:13:27 +0000 (15:13 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 21 Jul 2021 14:13:27 +0000 (15:13 +0100)
src/libserver/html/html.cxx

index d60210ba6e15857b95c5de742d3fc01618467df3..6cf3b959d3d263bec60bda32c57c4df470e2abda 100644 (file)
@@ -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 += ' ';
                                }