]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - mvm_cmds.c
snd: fix a hard-to-repro segfault when joining a server
[xonotic/darkplaces.git] / mvm_cmds.c
index ba785d59c239c824b953932f3f0d58d8b988959a..8e63f37a563830c3d52208de545795029744974f 100644 (file)
@@ -557,7 +557,7 @@ static void VM_M_getserverlistnumber(prvm_prog_t *prog)
                        break;
                case SLIF_PING:
                        // display inf when a listed server times out and net_slist_pause blocks its removal
-                       PRVM_G_FLOAT( OFS_RETURN ) = cache->info.ping ?: INFINITY;
+                       PRVM_G_FLOAT( OFS_RETURN ) = cache->info.ping ? cache->info.ping : INFINITY;
                        break;
                case SLIF_PROTOCOL:
                        PRVM_G_FLOAT( OFS_RETURN ) = cache->info.protocol;