[Gtk-sharp-list] Patch: Pango.Layout.custom, Lines array creation

Moritz Balz verteiler@mbalz.de
Mon, 05 Apr 2004 00:17:36 +0200


This is a multi-part message in MIME format.
--------------000706080308000300060001
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello,

attached is a patch that fixes a bug in the Lines array creation in
Pango.Layout.custom - the array indexer needs to be increased.

M.


--------------000706080308000300060001
Content-Type: text/x-patch;
 name="Layout.custom.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="Layout.custom.diff"

--- Layout.custom.old	2004-03-12 22:18:10.000000000 +0100
+++ Layout.custom	2004-04-05 00:06:41.000000000 +0200
@@ -18,8 +18,10 @@
 		GLib.SList list = new GLib.SList(list_ptr, typeof (Pango.LayoutLine));
 		LayoutLine[] result = new LayoutLine [list.Count];
 		int i = 0;
-		foreach (LayoutLine line in list)
+		foreach (LayoutLine line in list) {
 			result [i] = line;
+			i++;
+		}
 		return result;
 	}
 }


--------------000706080308000300060001--