X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=crypto.c;h=05d763d6cdc673f82603f4639549ccbe5f8ede87;hb=3161ae840da309834bd08f39be63777836fade71;hp=00bcf0a1337062872d353eb92ecb4b19c49c6ae5;hpb=18f04155584c87a958f78827954d428ce55a8aaf;p=xonotic%2Fdarkplaces.git diff --git a/crypto.c b/crypto.c index 00bcf0a1..05d763d6 100644 --- a/crypto.c +++ b/crypto.c @@ -1727,8 +1727,8 @@ static int Crypto_ServerParsePacket_Internal(const char *data_in, size_t len_in, return CRYPTO_NOMATCH; // will be later accepted if encryption was set up // validate the challenge for (i = 0;i < MAX_CHALLENGES;i++) - if(challenge[i].time > 0) - if (!LHNETADDRESS_Compare(peeraddress, &challenge[i].address) && !strcmp(challenge[i].string, s)) + if(challenges[i].time > 0) + if (!LHNETADDRESS_Compare(peeraddress, &challenges[i].address) && !strcmp(challenges[i].string, s)) break; // if the challenge is not recognized, drop the packet if (i == MAX_CHALLENGES) // challenge mismatch is silent @@ -1758,8 +1758,8 @@ static int Crypto_ServerParsePacket_Internal(const char *data_in, size_t len_in, return Crypto_SoftServerError(data_out, len_out, "missing challenge in d0pk\\0"); // validate the challenge for (i = 0;i < MAX_CHALLENGES;i++) - if(challenge[i].time > 0) - if (!LHNETADDRESS_Compare(peeraddress, &challenge[i].address) && !strcmp(challenge[i].string, s)) + if(challenges[i].time > 0) + if (!LHNETADDRESS_Compare(peeraddress, &challenges[i].address) && !strcmp(challenges[i].string, s)) break; // if the challenge is not recognized, drop the packet if (i == MAX_CHALLENGES)