Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=setup.git;a=commitdiff;h=96f289fa04eca35088fa7243c24517403ab21711

commit 96f289fa04eca35088fa7243c24517403ab21711
Author: Miklos Vajna <[EMAIL PROTECTED]>
Date:   Mon Jan 21 20:34:57 2008 +0100

fw_checklist(): also don't forget the restore the original buffer
after we used our own

diff --git a/src/util.c b/src/util.c
index 5522d06..48af91b 100644
--- a/src/util.c
+++ b/src/util.c
@@ -509,9 +509,10 @@ GList* fw_checklist(const char *title, const char 
*cprompt, int height,
int width, int menu_height, int item_no, char **items, int flag)
{
int ret;
-       char *ptr, *ptrn;
+       char *ptr, *ptrn, *buf;
GList *list=NULL;

+       buf = dialog_vars.input_result;
MALLOC(dialog_vars.input_result, item_no*256);
dialog_vars.input_result[0] = '\0';
ret = dialog_checklist(title, cprompt, height, width,
@@ -520,6 +521,7 @@ GList* fw_checklist(const char *title, const char *cprompt, 
int height,
{
// no item selected
FREE(dialog_vars.input_result);
+               dialog_vars.input_result = buf;
return(list);
}

@@ -539,6 +541,7 @@ GList* fw_checklist(const char *title, const char *cprompt, 
int height,
*ptrn='\0';
list = g_list_append(list, strdup(ptr));
FREE(dialog_vars.input_result);
+       dialog_vars.input_result = buf;
return(list);
}
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to