Skip to content

Commit

Permalink
Merge pull request universal-ctags#2283 from masatake/cyyever-bug_fix
Browse files Browse the repository at this point in the history
lregex: fix lang_set to avoid core dump
  • Loading branch information
masatake authored Oct 30, 2019
2 parents 5357b20 + 02108d6 commit f857937
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main/lregex.c
Original file line number Diff line number Diff line change
Expand Up @@ -1646,8 +1646,10 @@ static bool fillGuestRequest (const char *start,
int size = pmatch [guest_spec->lang.spec.patternGroup].rm_eo
- pmatch [guest_spec->lang.spec.patternGroup].rm_so;
if (size > 0)
{
guest_req->lang = getNamedLanguage (name, size);
guest_req->lang_set = true;
guest_req->lang_set = true;
}
}
else if (guest_spec->lang.type == GUEST_LANG_PTN_GROUP_FOR_FILEMAP)
{
Expand All @@ -1659,9 +1661,9 @@ static bool fillGuestRequest (const char *start,
if (fname)
{
guest_req->lang = getLanguageForFilename (fname, LANG_AUTO);
guest_req->lang_set = true;
eFree (fname);
}
guest_req->lang_set = true;
}

for (int i = 0; i < 2; i++)
Expand Down

0 comments on commit f857937

Please sign in to comment.