From 95a430c74d230b8600e99a0fcc6204836eb08d8c Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Sun, 1 Nov 2009 17:49:57 +0000 Subject: [PATCH] 2009-11-01 Mike Kestner * glib/Value.cs: avoid cast exceptions passing ints as objects on gulong values. [Fixes #539812] svn path=/trunk/gtk-sharp/; revision=145169 --- ChangeLog | 5 +++++ glib/Value.cs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9e46ff6c1..78ac85b66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-01 Mike Kestner + + * glib/Value.cs: avoid cast exceptions passing ints as objects on + gulong values. [Fixes #539812] + 2009-10-30 Mike Kestner * glib/GType.cs: avoid another exception on bogus assm.Locations. diff --git a/glib/Value.cs b/glib/Value.cs index 81e67ad38..d7e5d75a6 100755 --- a/glib/Value.cs +++ b/glib/Value.cs @@ -552,7 +552,7 @@ namespace GLib { else if (type == GType.UInt64.Val) g_value_set_uint64 (ref this, (ulong) value); else if (type == GType.ULong.Val) - SetULongForPlatform ((ulong) value); + SetULongForPlatform (Convert.ToUInt64 (value)); else if (GType.Is (type, GType.Enum)) g_value_set_enum (ref this, (int)value); else if (GType.Is (type, GType.Flags))