From 54b93d63906032c76dff9ccc780d3c28f10c4066 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 12 Nov 2006 14:53:57 +0000 Subject: [PATCH] Be a bit more paranoid about this loop. SVN revision: 27075 --- legacy/ecore/src/lib/ecore_desktop/ecore_desktop.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/legacy/ecore/src/lib/ecore_desktop/ecore_desktop.c b/legacy/ecore/src/lib/ecore_desktop/ecore_desktop.c index 1d2d86035b..f0eba7be89 100644 --- a/legacy/ecore/src/lib/ecore_desktop/ecore_desktop.c +++ b/legacy/ecore/src/lib/ecore_desktop/ecore_desktop.c @@ -841,7 +841,7 @@ ecore_desktop_get_command(Ecore_Desktop * desktop, Ecore_List * files, int fill) { Ecore_List *result; char *sub_result = NULL, *params = NULL; - int is_single; + int is_single = 0, do_file = 0; result = ecore_list_new(); if (!result) return NULL; @@ -913,9 +913,10 @@ if (files) ecore_dlist_goto_first(command); while ((p = ecore_dlist_next(command)) != NULL) { - int do_file = 0, is_URL = 0, is_directory = 0, is_file = 0; + int is_URL = 0, is_directory = 0, is_file = 0; t = NULL; + do_file = 0; is_single = 0; if (p[0] == '%') switch (p[1]) @@ -991,7 +992,7 @@ if (files) default: break; } - /* TAke care of any file expansions. */ + /* Take care of any file expansions. */ if (do_file && (files)) { char *file; @@ -1113,7 +1114,7 @@ if (files) * go back and do it all again for the next file. */ } - while((is_single) && (fill) && (files) && (ecore_list_current(files))); + while((do_file) && (is_single) && (fill) && (files) && (ecore_list_current(files))); error: if (params) free(params);