-rw-r--r-- | scripts/lxdialog/util.c | 2 |
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 | |||
@@ -343,17 +343,17 @@ int | |||
343 | first_alpha(const char *string, const char *exempt) | 343 | first_alpha(const char *string, const char *exempt) |
344 | { | 344 | { |
345 | int i, in_paren=0, c; | 345 | int i, in_paren=0, c; |
346 | 346 | ||
347 | for (i = 0; i < strlen(string); i++) { | 347 | for (i = 0; i < strlen(string); i++) { |
348 | c = tolower(string[i]); | 348 | c = tolower(string[i]); |
349 | 349 | ||
350 | if (strchr("<[(", c)) ++in_paren; | 350 | if (strchr("<[(", c)) ++in_paren; |
351 | if (strchr(">])", c)) --in_paren; | 351 | if (strchr(">])", c) && in_paren > 0) --in_paren; |
352 | 352 | ||
353 | if ((! in_paren) && isalpha(c) && | 353 | if ((! in_paren) && isalpha(c) && |
354 | strchr(exempt, c) == 0) | 354 | strchr(exempt, c) == 0) |
355 | return i; | 355 | return i; |
356 | } | 356 | } |
357 | 357 | ||
358 | return 0; | 358 | return 0; |
359 | } | 359 | } |