Fix infinite loop when quoting long URL.
authorDarko Koruga <darko@users.sourceforge.net>
Mon, 29 Oct 2001 09:17:02 +0000 (09:17 +0000)
committerDarko Koruga <darko@users.sourceforge.net>
Mon, 29 Oct 2001 09:17:02 +0000 (09:17 +0000)
ChangeLog.claws
configure.in
src/compose.c

index 1ffee24..842957c 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-29 [darko]
+
+       * src/compose.c
+               fix infinite loop when long URL is quoted
+               (closes bug #475122.
+
 2001-10-28 [match]
 
        * src/mutt.[ch] src/importmutt.[ch] src/mgutils.[ch] src/addressbook.c src/Makefile.am
index a6b0cbc..1390f36 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=6
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws12
+EXTRA_VERSION=claws13
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index 79b377c..7d92221 100644 (file)
@@ -2399,10 +2399,10 @@ static void compose_wrap_line_all(Compose *compose)
                if (cur_len + ch_len > linewrap_len) {
                        gint tlen;
 
-                       if (line_len == 0) {
+                       if (line_len == 0 || line_pos != prev_line_pos) {
                                /* don't wrap URLs */
                                if (is_url_string(text, line_pos, text_len))
-                                       continue;
+                                       goto dontwrapurl;
                                line_len = cur_pos - line_pos;
                                line_pos = cur_pos;
                        }
@@ -2457,6 +2457,7 @@ static void compose_wrap_line_all(Compose *compose)
                        continue;
                }
 
+dontwrapurl:
                if (ch_len > 1) {
                        line_pos = cur_pos + 1;
                        line_len = cur_len + ch_len;