summaryrefslogtreecommitdiff
path: root/user-interface.c
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2008-02-13 10:20:36 -0800
committerAaron Plattner <aplattner@nvidia.com>2008-02-13 10:20:36 -0800
commitb581a5923ce164af5c8cd5634f4cba4fd098f711 (patch)
tree3a0295cdd4fa9bcdd7e1ce6308834d552fe66402 /user-interface.c
parentf048a99526c5bad39bef29d414635ad3a5b53371 (diff)
1.0-66291.0-6629
Diffstat (limited to 'user-interface.c')
-rw-r--r--user-interface.c6
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);