fix error checking for \ at end of regex (this was broken previously)
authorRich Felker <dalias@aerifal.cx>
Mon, 7 May 2012 21:55:13 +0000 (17:55 -0400)
committerRich Felker <dalias@aerifal.cx>
Mon, 7 May 2012 21:55:13 +0000 (17:55 -0400)
src/regex/regcomp.c

index c72f7d6..ea6e6a6 100644 (file)
@@ -1210,7 +1210,7 @@ tre_parse(tre_parse_ctx_t *ctx)
                  }
              }
 
-             if (!*ctx->re)
+             if (!ctx->re[1])
                /* Trailing backslash. */
                return REG_EESCAPE;