summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/gui/gwps-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 5043b33ec0..14a0d565f4 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -1311,9 +1311,9 @@ static int evaluate_conditional(struct gui_wps *gwps, int cond_index)
1311 result, sizeof(result), &intval); 1311 result, sizeof(result), &intval);
1312 1312
1313 /* intval is now the number of the enum option we want to read, 1313 /* intval is now the number of the enum option we want to read,
1314 starting from 1. If intval is -1, we check on the nullity of value. */ 1314 starting from 1. If intval is -1, we check if value is empty. */
1315 if (intval == -1) 1315 if (intval == -1)
1316 intval = value ? 1 : num_options; 1316 intval = value && strlen(value) ? 1 : num_options;
1317 else if (intval > num_options || intval < 1) 1317 else if (intval > num_options || intval < 1)
1318 intval = num_options; 1318 intval = num_options;
1319 1319