From: Vsevolod Stakhov Date: Mon, 13 Feb 2017 14:34:12 +0000 (+0000) Subject: [Minor] Fix corner cases in non-ascii characters counter X-Git-Tag: 1.5.0~115 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3103d0192c6982ffca3bf8672c82b3e5318aa5d9;p=rspamd.git [Minor] Fix corner cases in non-ascii characters counter --- diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c index 669ac5bd9..5bd59a32d 100644 --- a/src/lua/lua_util.c +++ b/src/lua/lua_util.c @@ -1904,6 +1904,10 @@ lua_util_count_non_ascii (lua_State *L) ret ++; total ++; + if (np == NULL) { + break; + } + p = (np != p) ? np : p + 1; continue;