Update app.c

Fixed an incorrect error check in a caller of str_printf()
Fixed wizard_get_input() to check for 0 bufsize and NULL buf pointer.