MapInfo: Fix ArgumentOutOfRangeException
authorStephan Sundermann <ssundermann@gnome.org>
Wed, 21 Jan 2015 19:50:21 +0000 (20:50 +0100)
committerStephan Sundermann <ssundermann@gnome.org>
Wed, 21 Jan 2015 19:50:21 +0000 (20:50 +0100)
Respect the value's length so there is no exception when value doesn't contain size's bytes.

sources/custom/MapInfo.cs

index 49af97f..ab2cf2a 100644 (file)
@@ -34,7 +34,7 @@ namespace Gst {
                                return data;
                        }
                        set {
-                               Marshal.Copy (value, 0, _data, Data.Length);
+                               Marshal.Copy (value, 0, _data, value.Length);
                        }
                }