summaryrefslogtreecommitdiff
path: root/scripts/lxdialog/util.c
Side-by-side diff
Diffstat (limited to 'scripts/lxdialog/util.c') (more/less context) (ignore whitespace changes)
-rw-r--r--scripts/lxdialog/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lxdialog/util.c b/scripts/lxdialog/util.c
index b3a7af9..e7bce9b 100644
--- a/scripts/lxdialog/util.c
+++ b/scripts/lxdialog/util.c
@@ -348,7 +348,7 @@ first_alpha(const char *string, const char *exempt)
c = tolower(string[i]);
if (strchr("<[(", c)) ++in_paren;
- if (strchr(">])", c)) --in_paren;
+ if (strchr(">])", c) && in_paren > 0) --in_paren;
if ((! in_paren) && isalpha(c) &&
strchr(exempt, c) == 0)