mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +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;
|
||||
|
||||
/* 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)++;
|
||||
|
Loading…
Reference in New Issue
Block a user