Fix off-by-one bounds checking in printf_encode()