]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
protocol: strncmp until length of input, so BJP2 and 3 are selectable
authorCloudwalk <cloudwalk009@gmail.com>
Tue, 22 Sep 2020 03:56:42 +0000 (23:56 -0400)
committerCloudwalk <cloudwalk009@gmail.com>
Tue, 22 Sep 2020 03:56:42 +0000 (23:56 -0400)
protocol.c

index f0a6917c05a97849f5f13b3a33356668420fcf8b..21db9f03334481766aa2766c2701f6fb63270523 100644 (file)
@@ -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];