diff --git a/tools/check-bolt.c b/tools/check-bolt.c index dd1c7ae84..59bbf5c20 100644 --- a/tools/check-bolt.c +++ b/tools/check-bolt.c @@ -102,9 +102,14 @@ static char *find_bolt_ref(const char *prefix, char **p, size_t *len) size_t preflen; /* BOLT #X: */ - *p = strstr(*p, prefix); + *p = strchr(*p, '*'); if (!*p) return NULL; + *p += 1; + while (cisspace(**p)) + (*p)++; + if (strncmp(*p, prefix, strlen(prefix)) != 0) + continue; *p += strlen(prefix); while (cisspace(**p)) (*p)++;