]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Use zw space check macro
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 16 Jan 2019 13:23:00 +0000 (13:23 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 16 Jan 2019 13:23:00 +0000 (13:23 +0000)
src/libmime/message.c

index cb85a512b911fbd0675079008db898f3895f9050..b7d43e3566235e484c12fa4546379eb33808d5fe 100644 (file)
@@ -239,7 +239,7 @@ rspamd_strip_newlines_parse (struct rspamd_task *task,
 
                        if (uc != -1) {
                                while (p < pe) {
-                                       if (uc == 0x200b || uc == 0x200c) {
+                                       if (IS_ZERO_WIDTH_SPACE (uc)) {
                                                /* Invisible space ! */
                                                task->flags |= RSPAMD_TASK_FLAG_BAD_UNICODE;
                                                part->spaces ++;
@@ -253,7 +253,7 @@ rspamd_strip_newlines_parse (struct rspamd_task *task,
 
                                                U8_NEXT (begin, off, pe - begin, uc);
 
-                                               if (uc != 0x200b) {
+                                               if (!IS_ZERO_WIDTH_SPACE (uc)) {
                                                        break;
                                                }