summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-05-07 17:55:13 -0400
committerRich Felker <dalias@aerifal.cx>2012-05-07 17:55:13 -0400
commit952700e8c32f7e81045cd01e1ecb3f7ca3f4c762 (patch)
tree10bdd636a27c1f2e95044d393b6d25731bfadb44
parent17361482108e2a8757dc4aa69ed36b002251a08f (diff)
downloadmusl-952700e8c32f7e81045cd01e1ecb3f7ca3f4c762.tar.gz
musl-952700e8c32f7e81045cd01e1ecb3f7ca3f4c762.tar.bz2
musl-952700e8c32f7e81045cd01e1ecb3f7ca3f4c762.tar.xz
musl-952700e8c32f7e81045cd01e1ecb3f7ca3f4c762.zip
fix error checking for \ at end of regex (this was broken previously)
-rw-r--r--src/regex/regcomp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c
index c72f7d63..ea6e6a69 100644
--- a/src/regex/regcomp.c
+++ b/src/regex/regcomp.c
@@ -1210,7 +1210,7 @@ tre_parse(tre_parse_ctx_t *ctx)
}
}
- if (!*ctx->re)
+ if (!ctx->re[1])
/* Trailing backslash. */
return REG_EESCAPE;