diff options
author | Holden Rohrer <hr@hrhr.dev> | 2020-05-25 02:26:08 -0400 |
---|---|---|
committer | Holden Rohrer <hr@hrhr.dev> | 2020-05-25 02:26:08 -0400 |
commit | 7fda917cfc5ae8f48df5eadc7c8d13c304af6012 (patch) | |
tree | 91ede7526208979b46fe5111f591eed873cb62ad | |
parent | f3dcedb76e54dc3f07a7ec522fad5a32d8f66110 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |