summaryrefslogtreecommitdiff
path: root/src/fmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fmt.c')
-rw-r--r--src/fmt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fmt.c b/src/fmt.c
index 308b64555..3da198e16 100644
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <sys/types.h>
#include <getopt.h>
+#include <assert.h>
/* Redefine. Otherwise, systems (Unicos for one) with headers that define
it to be a type get syntax errors for the variable declaration below. */
@@ -610,6 +611,11 @@ get_paragraph (FILE *f)
while (same_para (c) && in_column == other_indent)
c = get_line (f, c);
}
+
+ /* Tell static analysis tools that using word_limit[-1] is ok.
+ word_limit is guaranteed to have been incremented by get_line. */
+ assert (word < word_limit);
+
(word_limit - 1)->period = (word_limit - 1)->final = true;
next_char = c;
return true;