]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Avoid running ColorTranslateRGB on an empty string
authorMario <mario.mario@y7mail.com>
Sun, 8 Jan 2023 10:21:20 +0000 (20:21 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 8 Jan 2023 10:21:20 +0000 (20:21 +1000)
qcsrc/common/ent_cs.qh

index d9608ebfb896792aa80f48296b9fc26efc5c5a29..aa689e59d707684eda169334528faf49cce8eefe 100644 (file)
@@ -130,7 +130,7 @@ REGISTER_NET_TEMP(CLIENT_ENTCS)
        string entcs_GetName(int i)
        {
                entity e = entcs_receiver(i);
-               return ColorTranslateRGB(e ? e.netname : "");
+               return e ? ColorTranslateRGB(e.netname) : "";
        }
 
     /**