Fix issue with broken color codes resulting in infty loop.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>