gtkhtml r9032 - branches/gnome-2-24/gtkhtml



Author: abharath
Date: Sun Oct 19 17:18:16 2008
New Revision: 9032
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=9032&view=rev

Log:
2008-10-03  Milan Crha  <mcrha redhat com>

        ** Fix for bug #546155

         * htmltext.c: (convert_nbsp), (update_index_interval):
         Update correct index, otherwise it crashes.


Modified:
   branches/gnome-2-24/gtkhtml/ChangeLog
   branches/gnome-2-24/gtkhtml/htmltext.c

Modified: branches/gnome-2-24/gtkhtml/htmltext.c
==============================================================================
--- branches/gnome-2-24/gtkhtml/htmltext.c	(original)
+++ branches/gnome-2-24/gtkhtml/htmltext.c	Sun Oct 19 17:18:16 2008
@@ -1979,11 +1979,12 @@
 	gunichar uc;
 	const gchar *this_p, *p;
 
+	p = text;
+	white_space = 0;
+
 #ifdef DEBUG_NBSP
 	printf ("convert_nbsp: %s --> \"", p);
 #endif
-	p = text;
-	white_space = 0;
 
 	while (*p) {
 		this_p = p;
@@ -2043,7 +2044,7 @@
 		struct TmpDeltaRecord *rec = c->data;
 
 		if (*end_index > index && *end_index <= rec->index) {
-			(*start_index) += delta;
+			(*end_index) += delta;
 			break;
 		}
 		index = rec->index;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]