From 2eda898ed3b666fd1161de0fa1d7a8dce2ff4bec Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Wed, 6 Apr 2022 22:15:20 -0700 Subject: [PATCH] Fix self-comparison Here, a value was being compared for equality with itself. GCC warns that this is probably a mistake. I'm assuming that here we are meant to write out a word count when the minimum and maximum counted words are equal? --- Chapter 5/TeX Format.w | 2 +- Tangled/inweb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Chapter 5/TeX Format.w b/Chapter 5/TeX Format.w index 4ddfb35..1a43749 100644 --- a/Chapter 5/TeX Format.w +++ b/Chapter 5/TeX Format.w @@ -611,7 +611,7 @@ int TeX::preform_document(weave_format *self, text_stream *OUT, web *W, if (L->preform_nonterminal_defined->voracious) WRITE(" (voracious)"); else if (L->preform_nonterminal_defined->min_word_count == - L->preform_nonterminal_defined->min_word_count) + L->preform_nonterminal_defined->max_word_count) WRITE(" (%d word%s)", L->preform_nonterminal_defined->min_word_count, (L->preform_nonterminal_defined->min_word_count != 1)?"s":""); diff --git a/Tangled/inweb.c b/Tangled/inweb.c index 7cd7cd6..e100920 100644 --- a/Tangled/inweb.c +++ b/Tangled/inweb.c @@ -28087,7 +28087,7 @@ int TeX__preform_document(weave_format *self, text_stream *OUT, web *W, if (L->preform_nonterminal_defined->voracious) WRITE(" (voracious)"); else if (L->preform_nonterminal_defined->min_word_count == - L->preform_nonterminal_defined->min_word_count) + L->preform_nonterminal_defined->max_word_count) WRITE(" (%d word%s)", L->preform_nonterminal_defined->min_word_count, (L->preform_nonterminal_defined->min_word_count != 1)?"s":"");