From 05a158ecf3de3d61de88847e414c6f0b264edacf Mon Sep 17 00:00:00 2001 From: Magnus Holmgren Date: Wed, 2 May 2007 16:28:24 +0000 Subject: Treat empty strings as 'no value' in conditionals, as it used to. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13304 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/gwps-common.c | 4 ++-- 1 file 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) result, sizeof(result), &intval); /* intval is now the number of the enum option we want to read, - starting from 1. If intval is -1, we check on the nullity of value. */ + starting from 1. If intval is -1, we check if value is empty. */ if (intval == -1) - intval = value ? 1 : num_options; + intval = value && strlen(value) ? 1 : num_options; else if (intval > num_options || intval < 1) intval = num_options; -- cgit v1.2.3