Fix off-by-one error

This would cause the last char before the hostname to sometimes stay
bold and not be properly reset to a regular font.

Fixes #10982.