diff --git a/ChangeLog b/ChangeLog index 05fbfb5bb..6d2d337b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-06-08 Christian Hoff + + * generator/Signal.cs: Fix indexing of the signal arguments array for + "out" and "ref" parameters. [Fixes #508572] + 2009-05-28 Aaron Bockover * generator/EnumGen.cs: Fix enum generator to properly parse integer diff --git a/generator/Signal.cs b/generator/Signal.cs index b2ee0aadf..f5def07f6 100644 --- a/generator/Signal.cs +++ b/generator/Signal.cs @@ -179,9 +179,9 @@ namespace GtkSharp.Generation { sw.WriteLine("\t\t\t\targs.Args[" + idx + "] = " + p.FromNative ("arg" + idx) + ";"); } if (igen is StructBase && p.PassAs == "ref") - finish += "\t\t\t\tif (arg" + idx + " != IntPtr.Zero) System.Runtime.InteropServices.Marshal.StructureToPtr (args.Args[" + (idx-1) + "], arg" + idx + ", false);\n"; + finish += "\t\t\t\tif (arg" + idx + " != IntPtr.Zero) System.Runtime.InteropServices.Marshal.StructureToPtr (args.Args[" + idx + "], arg" + idx + ", false);\n"; else if (p.PassAs != "") - finish += "\t\t\t\targ" + idx + " = " + igen.ToNativeReturn ("((" + p.CSType + ")args.Args[" + (idx - 1) + "])") + ";\n"; + finish += "\t\t\t\targ" + idx + " = " + igen.ToNativeReturn ("((" + p.CSType + ")args.Args[" + idx + "])") + ";\n"; } return finish; }