Skip to content

Commit

Permalink
man/parse: proper structure checks for LINE_TP and LINE_PP
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Oct 2, 2024
1 parent 51f473a commit 625609c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/man/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ int troff_parse(const unsigned char* map, size_t mlen, pagedom* dom){
current_subsection->ttype = node;
current_para = current_subsection;
}else if(node->ltype == LINE_PP){
if(dom->root == NULL){
if(current_para == NULL){
fprintf(stderr, "paragraph transcends structure\n");
return -1;
}
Expand All @@ -336,7 +336,7 @@ int troff_parse(const unsigned char* map, size_t mlen, pagedom* dom){
}
current_para->ttype = node;
}else if(node->ltype == LINE_TP){
if(dom->root == NULL){
if(current_para == NULL){
fprintf(stderr, "tagged paragraph transcends structure\n");
return -1;
}
Expand Down

0 comments on commit 625609c

Please sign in to comment.