The function returns bool, so a return value of zero is regarded as
false. Consequently, server feature #0 (sha256) is not detected even
if it is announced by the server, and therefore the client does not
request it. Hence both sides fall back to sha1.
This bug was introduced in paraslash-0.7.2.
Fixes: a0707daa23f8706326aa837f969c20d3e4ee02aa
return false;
for (int i = 0; ct->features[i]; i++)
if (strcmp(feature, ct->features[i]) == 0)
- return i;
+ return true;
return false;
}