Fixes incorrect indexing of KEX prefs string
After stripping out an invalid KEX pref entry, it would incorrectly advance again leaving invalid values in the list.
@@ -3527,9 +3527,10 @@ libssh2_session_method_pref(LIBSSH2_SESSION * session, int method_type,
}
}
}
-
+ else {
s = p ? (p + 1) : NULL;
}
+ }
if(strlen(newprefs) == 0) {
LIBSSH2_FREE(session, newprefs);
