Commit e6f12e90 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Prefer exact matches

If there are multiple matches for a given VSL tag (such as "Hit"
matching both Hit and HitPass), prefer the one that is an exact match.

Fixes #1288
parent 2f940fb9
......@@ -70,6 +70,10 @@ VSL_Name2Tag(const char *name, int l)
for (i = 0; i < 256; i++) {
if (VSL_tags[i] != NULL &&
!strncasecmp(name, VSL_tags[i], l)) {
if (strlen(VSL_tags[i]) == l) {
/* Exact match */
return (i);
}
if (n == -1)
n = i;
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment