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 | |
| parent | 378a140ae2bdd373ec64066f5afe70b65f237d66 (diff) | |
| download | rockbox-05a158ecf3de3d61de88847e414c6f0b264edacf.zip rockbox-05a158ecf3de3d61de88847e414c6f0b264edacf.tar.gz rockbox-05a158ecf3de3d61de88847e414c6f0b264edacf.tar.bz2 rockbox-05a158ecf3de3d61de88847e414c6f0b264edacf.tar.xz | |
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
| -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 5043b33..14a0d56 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; |