diff -r 4575977d3ce0 -r 9d3e1123bd43 hedgewars/uChat.pas --- a/hedgewars/uChat.pas Wed Mar 18 23:18:52 2015 +0300 +++ b/hedgewars/uChat.pas Wed Mar 18 21:52:13 2015 +0100 @@ -204,8 +204,15 @@ end else begin - color:= colors[str[1]]; - delete(str, 1, 1); + if str[1] <= High(colors) then + begin + color:= colors[str[1]]; + delete(str, 1, 1); + end + // fallback if invalid color + else + color:= colors[Low(colors)]; + cl.s:= str; end;