Explorar o código

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

Rich Felker %!s(int64=13) %!d(string=hai) anos
pai
achega
952700e8c3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;