Fix game freezing when listing items in SDL version

Just like #8772, utf8_width() may return a negative width, so cw must be checked.
This bug may cause the game freezing when pressing "V" to list items in Chinese SDL version.