aboutsummaryrefslogtreecommitdiff
path: root/badroff.c
diff options
context:
space:
mode:
Diffstat (limited to 'badroff.c')
-rw-r--r--badroff.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/badroff.c b/badroff.c
index 6a630ed..3d96fc7 100644
--- a/badroff.c
+++ b/badroff.c
@@ -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;