From: Cloudwalk Date: Tue, 22 Sep 2020 03:56:42 +0000 (-0400) Subject: protocol: strncmp until length of input, so BJP2 and 3 are selectable X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c3e2c4748556d7b72b52b5b257a54a59f00d3953;p=xonotic%2Fdarkplaces.git protocol: strncmp until length of input, so BJP2 and 3 are selectable --- diff --git a/protocol.c b/protocol.c index f0a6917c..21db9f03 100644 --- a/protocol.c +++ b/protocol.c @@ -321,7 +321,7 @@ protocol_t *Protocol_ForName(const char *name) int i; for(i = 0; &protocols[i]; i++) { - if(!strncmp(name, protocols[i]->name, strlen(protocols[i]->name))) + if(!strncmp(name, protocols[i]->name, strlen(name))) break; } return protocols[i];