From 7fda917cfc5ae8f48df5eadc7c8d13c304af6012 Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Mon, 25 May 2020 02:26:08 -0400 Subject: ZERO VALGRIND ERRORS! I was accidentally checking for a zero byte in already ended strings in the row-col loop of foldlines --- badroff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/badroff.c b/badroff.c index 385cd3c..9e6ba4c 100644 --- a/badroff.c +++ b/badroff.c @@ -172,7 +172,7 @@ char* foldlines(llnode* tail, size_t ct){ bool done = true; // if stays true, all strings are complete llnode* orig = tail; do { // check every string - if (tail->str[i] == 0) tail->end = true; + if (!tail->end && tail->str[i] == 0) tail->end = true; // ignore strings that have already finished else if (!tail->end){ done = false; -- cgit