main_write_char(): bugfix: terminate string with null