aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-05-25 02:26:08 -0400
committerHolden Rohrer <hr@hrhr.dev>2020-05-25 02:26:08 -0400
commit7fda917cfc5ae8f48df5eadc7c8d13c304af6012 (patch)
tree91ede7526208979b46fe5111f591eed873cb62ad
parentf3dcedb76e54dc3f07a7ec522fad5a32d8f66110 (diff)
ZERO VALGRIND ERRORS!
I was accidentally checking for a zero byte in already ended strings in the row-col loop of foldlines
-rw-r--r--badroff.c2
1 files changed, 1 insertions, 1 deletions
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;