diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-08-01 19:01:19 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-08-01 19:01:19 -0700 |
| commit | 80a087e454c01f2a1c323baabc8e53f4f66c4944 (patch) | |
| tree | 02ff3ed3aec35fce4a862fe87f1d9f5e969e025e | |
| parent | 860a03d29c2846c8ee69ad95cc6625321219927b (diff) | |
Minor cleanup
| -rw-r--r-- | match.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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); } |
