[libgda] Bug correction in gdaui_plugin_declare()



commit e43d74fc27944d1bc7ff6b460998b89410cf0140
Author: Vivien Malerba <malerba gnome-db org>
Date:   Fri Mar 18 18:55:26 2011 +0100

    Bug correction in gdaui_plugin_declare()

 libgda-ui/gdaui-init.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/libgda-ui/gdaui-init.c b/libgda-ui/gdaui-init.c
index 32086ec..c212af2 100644
--- a/libgda-ui/gdaui-init.c
+++ b/libgda-ui/gdaui-init.c
@@ -1,5 +1,5 @@
-/* GNOME DB library
- * Copyright (C) 1999 - 2010 The GNOME Foundation.
+/*
+ * Copyright (C) 1999 - 2011 The GNOME Foundation.
  *
  * AUTHORS:
  * 	Rodrigo Moya <rodrigo gnome-db org>
@@ -251,7 +251,7 @@ _gdaui_new_cell_renderer (GType type, const gchar *plugin_name)
 
 /**
  * gdaui_plugin_declare:
- * @plugin: a pointer to a structure filled to describe the new plugin
+ * @plugin: a pointer to a structure filled to describe the new plugin. All the contained information is copied.
  *
  * Adds a new plugin which will be used by the forms and grids. The new plugin, as
  * described by @plugin can declare a custom widget to be used for forms, grids, or both.
@@ -288,7 +288,7 @@ gdaui_plugin_declare (const GdauiPlugin *plugin)
 	np->nb_g_types = plugin->nb_g_types;
 	if (plugin->valid_g_types) {
 		np->valid_g_types = g_new0 (GType, np->nb_g_types);
-		memcpy (np->valid_g_types, plugin->valid_g_types, np->nb_g_types);
+		memcpy (np->valid_g_types, plugin->valid_g_types, sizeof (GType) * np->nb_g_types);
 	}
 
 	if (plugin->options_xml_spec)



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