]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] One more fix for old libicu
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 6 Oct 2021 07:56:53 +0000 (08:56 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 6 Oct 2021 07:56:53 +0000 (08:56 +0100)
src/libmime/mime_string.hxx

index 27483ce60911cd38880c2f7abf1187d6e0075aa4..c6041a7787e65b0dcc9f59ff710299a60cecf94e 100644 (file)
@@ -542,7 +542,7 @@ private:
        }
 
        auto append_c_string_filtered(const CharT* str, std::size_t len) -> std::size_t {
-               std::ptrdiff_t i = 0, o = 0;
+               std::int32_t i = 0; // We have to use int32_t here as old libicu is brain-damaged
                UChar32 uc;
                char tmp[4];
                auto orig_size = storage.size();
@@ -568,7 +568,7 @@ private:
                                        flags = flags | mime_string_flags::MIME_STRING_SEEN_ZEROES;
                                }
                                else {
-                                       o = 0;
+                                       std::int32_t o = 0;
                                        U8_APPEND_UNSAFE(tmp, o, uc);
                                        storage.append(tmp, o);
                                }