From 3103d0192c6982ffca3bf8672c82b3e5318aa5d9 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 13 Feb 2017 14:34:12 +0000 Subject: [PATCH] [Minor] Fix corner cases in non-ascii characters counter --- src/lua/lua_util.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.39.5