char safe input function declaration fix