aboutsummaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-08-01 19:01:19 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-08-01 19:01:19 -0700
commit80a087e454c01f2a1c323baabc8e53f4f66c4944 (patch)
tree02ff3ed3aec35fce4a862fe87f1d9f5e969e025e /match.c
parent860a03d29c2846c8ee69ad95cc6625321219927b (diff)
Minor cleanup
Diffstat (limited to 'match.c')
-rw-r--r--match.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/match.c b/match.c
index ede5316..bfb860c 100644
--- a/match.c
+++ b/match.c
@@ -543,10 +543,9 @@ static match_t *match(def_t *defs, file_t *f, const char *str, pat_t *pat, bool
}
// Subsequent indentation:
- while (*str == '\n') ++str;
- for (int i = 0; i < dents; i++) {
- if (str[i] != denter || &str[i] >= f->end) return NULL;
- }
+ while (*str == '\n' || *str == '\n') ++str;
+ for (int i = 0; i < dents; i++)
+ if (&str[i] >= f->end || str[i] != denter) return NULL;
return new_match(defs, pat, start, &str[dents], NULL);
}