From 7410b071bd7104a911e1b7e813c7677ee72c7cb1 Mon Sep 17 00:00:00 2001
From: Holden Rohrer
Date: Fri, 29 May 2020 01:02:02 -0400
Subject: fixed freenext bug
the function in its original form meant that multbreak wouldn't check
the node following the freed node like others.
---
badroff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/badroff.c b/badroff.c
index eae4d64..7716e85 100644
--- a/badroff.c
+++ b/badroff.c
@@ -136,7 +136,7 @@ static llnode* freenext(llnode* node){
free(tmp->str);
free(tmp);
if (tmp == node) return NULL;
- return node->next;
+ return node;
}
static void multbreak(sb* buffer, size_t start,
size_t len, llnode** tail, size_t* ct){
--
cgit