summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/dir.c b/dir.c
index a099d5e..ca2ca21 100644
--- a/dir.c
+++ b/dir.c
@@ -307,8 +307,17 @@ push_braces(ary, s)
p = s;
lbrace = rbrace = 0;
while (*p) {
- if (*p == '{' && !lbrace) lbrace = p;
- if (*p == '}' && lbrace) rbrace = p;
+ if (*p == '{') {
+ lbrace = p;
+ break;
+ }
+ p++;
+ }
+ while (*p) {
+ if (*p == '}' && lbrace) {
+ rbrace = p;
+ break;
+ }
p++;
}