diff options
author | Magnus Holmgren <magnushol@gmail.com> | 2007-05-02 16:28:24 +0000 |
---|---|---|
committer | Magnus Holmgren <magnushol@gmail.com> | 2007-05-02 16:28:24 +0000 |
commit | 05a158ecf3de3d61de88847e414c6f0b264edacf (patch) | |
tree | 3727f659d48faa9884853b768091ba929ba5f86a /apps/gui | |
parent | 378a140ae2bdd373ec64066f5afe70b65f237d66 (diff) | |
download | rockbox-05a158ecf3de3d61de88847e414c6f0b264edacf.tar.gz rockbox-05a158ecf3de3d61de88847e414c6f0b264edacf.zip |
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
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/gwps-common.c | 4 |
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 | ||