commit 37be9b54ca9248d40a1a2155413f9619ca8d04bc
parent 19a833c94e2066750d1ca3cca7ec538ed40b83ed
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Tue, 12 Mar 2019 16:36:32 -0500
justify: initialize a variable before making use of its value
When the mark is off, initialize not just 'bot_x' but also 'top_x'.
This fixes https://savannah.gnu.org/bugs/?55898.
Bug existed since the justifying of a marked region was introduced,
four days ago, with commit f7f5514e.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/text.c b/src/text.c
@@ -2115,6 +2115,7 @@ void do_justify(bool full_justify)
/* Start out at the first line of the paragraph. */
first_par_line = openfile->current;
last_par_line = openfile->current;
+ top_x = 0;
/* Set the number of lines to be pulled into the cutbuffer. */
if (full_justify)