]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - server/rcon2irc/rcon2irc.pl
fix a NUL getting created in rcon2irc when translating U+E000
[xonotic/xonotic.git] / server / rcon2irc / rcon2irc.pl
index f1eb7008cc928211f8bd3b8cf4fb5b38cd3e1ac7..13d9779126a43e97d40d6b69798759fd15d3c164 100755 (executable)
@@ -58,7 +58,7 @@ sub color_irc2dp($)
 }
 
 our @text_qfont_table = ( # ripped from DP console.c qfont_table
-    "\0", '#',  '#',  '#',  '#',  '.',  '#',  '#',
+    '',   '#',  '#',  '#',  '#',  '.',  '#',  '#',
     '#',  9,    10,   '#',  ' ',  13,   '.',  '.',
     '[',  ']',  '0',  '1',  '2',  '3',  '4',  '5',
     '6',  '7',  '8',  '9',  '.',  '<',  '=',  '>',
@@ -97,7 +97,7 @@ sub text_qfont_table($)
        my $o = ord $char;
        if($color_utf8_enable)
        {
-               return ($o & 0xFF00 == 0xE000) ? $text_qfont_table[$o & 0xFF] : $char;
+               return (($o & 0xFF00) == 0xE000) ? $text_qfont_table[$o & 0xFF] : $char;
        }
        else
        {