瀏覽代碼

fix error checking for \ at end of regex (this was broken previously)

Rich Felker 13 年之前
父節點
當前提交
952700e8c3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/regex/regcomp.c

+ 1 - 1
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;