I've tested these changes using the /api/v3/Series/AniDB/Search endpoint and it seems to get things working.
Given that the initial values for current.Distance & current.Index were always null-coalesced to int.MaxValue, result.Distance & index would always be less and as such the initial null value was always returned as the search result.
I've tested these changes using the
/api/v3/Series/AniDB/Search
endpoint and it seems to get things working.Given that the initial values for
current.Distance
¤t.Index
were always null-coalesced toint.MaxValue
,result.Distance
&index
would always be less and as such the initialnull
value was always returned as the search result.