Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-lysiuk committed Sep 12, 2024
1 parent c4eda2d commit 5a57255
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Quake/ls_edict.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,11 @@ static int LS_FindProgsFunction(const char* const functionname, int& functionind
if (!progs)
return -1;

if (functionindex >= progs->numfunctions)
functionindex = -1;

const auto MatchFunction = [functionname](const int index)
{
assert(index < progs->numfunctions);

const char* name = LS_GetProgsString(pr_functions[index].s_name);
return strcmp(name, functionname) == 0;
};
Expand Down

0 comments on commit 5a57255

Please sign in to comment.