diff options
Diffstat (limited to 'user-interface.c')
-rw-r--r-- | user-interface.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/user-interface.c b/user-interface.c index 1ef5a1c..4bfed83 100644 --- a/user-interface.c +++ b/user-interface.c @@ -204,14 +204,14 @@ char *ui_get_input(Options *op, const char *def, const char *fmt, ...) va_end(ap); if (op->no_questions) { - ret = nvstrdup(def); - tmp = nvstrcat(msg, " (Answer: '", ret," ')", NULL); + ret = nvstrdup(def ? def : ""); + tmp = nvstrcat(msg, " (Answer: '", ret, "')", NULL); if (!op->silent) { __ui->message(op, NV_MSG_LEVEL_LOG, tmp); } } else { ret = __ui->get_input(op, def, msg); - tmp = nvstrcat(msg, " (Answer: '", ret," ')", NULL); + tmp = nvstrcat(msg, " (Answer: '", ret, "')", NULL); } log_printf(op, TRUE, NV_BULLET_STR, tmp); nvfree(msg); |