summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2020-01-14 11:36:25 -0500
committerJakob Kaivo <jkk@ung.org>2020-01-14 11:36:25 -0500
commit0a2235b3a5d5f7daabf5233220f58eea848fe831 (patch)
tree99a9cd52980020b5b218debe10573b88d5f95573
parente44ac1094eaba6b7ca59d5b2539d660c44bba5c3 (diff)
fix escape of (
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 8e7d957..378614c 100644
--- a/main.c
+++ b/main.c
@@ -44,7 +44,7 @@ static bool matches(const char * restrict path, const regex_t * restrict re)
char *find_main(char **sources)
{
regex_t re;
- int rc = regcomp(&re, "int[[:space:]]+main[[:space:]\(]", REG_EXTENDED | REG_NEWLINE | REG_NOSUB);
+ int rc = regcomp(&re, "int[[:space:]]+main[[:space:]\\(]", REG_EXTENDED | REG_NEWLINE | REG_NOSUB);
assert(rc == 0);
char *ret = NULL;