diff --git a/src/process.c b/src/process.c index 7071998..16c62ae 100644 --- a/src/process.c +++ b/src/process.c @@ -51,13 +51,13 @@ bool process_find(tSyntaxElement* tree, tProcessingData** p_pdata) { if (se_istraversable(tree)) - if (tree->content.syntax->type == TOKEN && - tree->content.syntax->next != NULL && - tree->content.syntax->next->next != NULL) { + if (tree->content.syntax->type == TOKEN) { tSyntaxElement* token = tree->content.syntax; - if (strcmp(token->content.string,"def") == 0) { + if (strcmp(token->content.string,"def") == 0 && + token->next != NULL && + token->next->next != NULL) { char* replacethis = token->next->content.string;