diff options
-rw-r--r-- | gnu/lib/libdialog/checklist.c | 2 | ||||
-rw-r--r-- | gnu/lib/libdialog/menubox.c | 2 | ||||
-rw-r--r-- | gnu/lib/libdialog/radiolist.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/gnu/lib/libdialog/checklist.c b/gnu/lib/libdialog/checklist.c index 0e8e419..bc6bcba 100644 --- a/gnu/lib/libdialog/checklist.c +++ b/gnu/lib/libdialog/checklist.c @@ -214,7 +214,7 @@ draw: } delwin(save); } - else { + else if (result) { *result = '\0'; for (i = 0; i < item_no; i++) { if (status[i]) { diff --git a/gnu/lib/libdialog/menubox.c b/gnu/lib/libdialog/menubox.c index cc58211..ef945af 100644 --- a/gnu/lib/libdialog/menubox.c +++ b/gnu/lib/libdialog/menubox.c @@ -203,7 +203,7 @@ draw: } delwin(save); } - else + else if (result) strcpy(result, items[(scroll + choice) * 2]); delwin(menu); delwin(dialog); diff --git a/gnu/lib/libdialog/radiolist.c b/gnu/lib/libdialog/radiolist.c index d368944..88fee25 100644 --- a/gnu/lib/libdialog/radiolist.c +++ b/gnu/lib/libdialog/radiolist.c @@ -222,7 +222,7 @@ draw: } delwin(save); } - else { + else if (result) { *result = '\0'; for (i = 0; i < item_no; i++) { if (status[i]) { |