mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
tools/check-bolt: don't get confused by 'BOLT #1' in middle of a comment.
Insist it be prefixed with '* '. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
e52af0d1ea
commit
51d7a1404f
@ -102,9 +102,14 @@ static char *find_bolt_ref(const char *prefix, char **p, size_t *len)
|
|||||||
size_t preflen;
|
size_t preflen;
|
||||||
|
|
||||||
/* BOLT #X: */
|
/* BOLT #X: */
|
||||||
*p = strstr(*p, prefix);
|
*p = strchr(*p, '*');
|
||||||
if (!*p)
|
if (!*p)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
*p += 1;
|
||||||
|
while (cisspace(**p))
|
||||||
|
(*p)++;
|
||||||
|
if (strncmp(*p, prefix, strlen(prefix)) != 0)
|
||||||
|
continue;
|
||||||
*p += strlen(prefix);
|
*p += strlen(prefix);
|
||||||
while (cisspace(**p))
|
while (cisspace(**p))
|
||||||
(*p)++;
|
(*p)++;
|
||||||
|
Loading…
Reference in New Issue
Block a user