mirror of
https://github.com/vim/vim.git
synced 2025-10-13 06:54:15 -04:00
patch 8.0.1410: hang when using count() with an empty string
Problem: Hang when using count() with an empty string. Solution: Return zero for an empty string. (Dominique Pelle, closes #2465)
This commit is contained in:
@@ -2382,7 +2382,7 @@ f_count(typval_T *argvars, typval_T *rettv)
|
||||
char_u *p = argvars[0].vval.v_string;
|
||||
char_u *next;
|
||||
|
||||
if (!error && expr != NULL && p != NULL)
|
||||
if (!error && expr != NULL && *expr != NUL && p != NULL)
|
||||
{
|
||||
if (ic)
|
||||
{
|
||||
|
Reference in New Issue
Block a user