author | sheepluva |
Wed, 18 Mar 2015 21:52:13 +0100 | |
changeset 10863 | 9d3e1123bd43 |
parent 10862 | 4575977d3ce0 |
child 10864 | 9cf20f487ee9 |
--- 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;