From ca37ee67d97444f7abe7a0fd8330cb17ca48bd8d Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Tue, 20 Sep 2005 17:47:27 +0000 Subject: [PATCH] *really* fix the previous break_line() problem git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3024 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- src/text.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/text.c b/src/text.c index 264c8657..173e0935 100644 --- a/src/text.c +++ b/src/text.c @@ -575,10 +575,9 @@ ssize_t break_line(const char *line, ssize_t goal, bool newline) assert(line != NULL); while (*line != '\0' && goal >= 0) { - int pos; + size_t pos = 0; - line_len = parse_mbchar(line, NULL, NULL); - pos = mbwidth(line); + line_len = parse_mbchar(line, NULL, &pos); if (is_blank_mbchar(line) || (newline && *line == '\n')) { blank_loc = cur_loc; -- 2.39.5