diff options
author | rlar <rlar> | 2016-03-01 18:22:25 +0100 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2016-03-12 14:12:49 -0500 |
commit | bdc999cbc1b2e5e45af661849175dce5fe1c4036 (patch) | |
tree | e1f68b644ead2d95fca2adcec3ee51450a5df0d3 /src/regex.c | |
parent | fb60d5a04e89329613942e9fca6ef2fa6b67f694 (diff) |
improve readability
Diffstat (limited to 'src/regex.c')
-rw-r--r-- | src/regex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regex.c b/src/regex.c index b44d958..2eacacc 100644 --- a/src/regex.c +++ b/src/regex.c @@ -82,7 +82,7 @@ char *regmatch_dup (regmatch_t * m, const char *src) char *str; size_t len; - if (m == NULL || m->rm_so < 0) + if (m == NULL || m->rm_so < 0 || m->rm_eo < m->rm_so) return NULL; len = (size_t) (m->rm_eo - m->rm_so); str = malloc((len + 1) * sizeof(char)); |