summaryrefslogtreecommitdiffhomepage
path: root/lexer.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-04-01 19:24:49 +0200
committerJo-Philipp Wich <jo@mein.io>2021-04-24 23:44:04 +0200
commitf2c4b79feaffd7b2fdb4041f47c9cd0f4cc3bc6e (patch)
tree4b07c881aacb2a81f027ce59fe0e8b2bb63b2eaa /lexer.c
parent93ededbe93ff1e5949387996b69892c9220a94e8 (diff)
treewide: fix issues reported by clang code analyzer
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lexer.c')
-rw-r--r--lexer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lexer.c b/lexer.c
index ada8671..1fba88f 100644
--- a/lexer.c
+++ b/lexer.c
@@ -728,7 +728,7 @@ parse_label(uc_lexer *lex, bool no_regexp)
if (!buf_remaining(lex) || (lex->bufstart[0] != '_' && !isalnum(lex->bufstart[0]))) {
for (i = 0, word = &reserved_words[0]; i < ARRAY_SIZE(reserved_words); i++, word = &reserved_words[i]) {
- if (lex->lookbehindlen == word->plen && !strncmp(lex->lookbehind, word->pat, word->plen)) {
+ if (lex->lookbehind && lex->lookbehindlen == word->plen && !strncmp(lex->lookbehind, word->pat, word->plen)) {
lookbehind_reset(lex);
switch (word->type) {