diff options
Diffstat (limited to 'badroff.c')
-rw-r--r-- | badroff.c | 17 |
1 files changed, 7 insertions, 10 deletions
@@ -160,16 +160,13 @@ char* lineset(char* txt){ bool done = true; // if stays true, all strings are complete llnode* orig = tail; do { // check every string - if (tail->end) goto iter; - if (tail->str[i] == 0){ - tail->end = true; - goto iter; - } // ignore strings that have already finished - done = false; - if (tail->str[i] != ' ') - valid = false; - // doesn't break because tail needs to return to orig - iter: + if (tail->str[i] == 0) tail->end = true; + // ignore strings that have already finished + else if (!tail->end){ + done = false; + if (tail->str[i] != ' ') valid = false; + // can't break here because tail needs to return to orig + } tail = tail->next; } while (tail != orig); if (valid) brk = i; |