anjuta r4111 - in trunk: . plugins/build-basic-autotools



Author: sgranjoux
Date: Sun Aug  3 20:40:43 2008
New Revision: 4111
URL: http://svn.gnome.org/viewvc/anjuta?rev=4111&view=rev

Log:
	* plugins/build-basic-autotools/program.c:
	Fix crash on 64bits machine due to the previous change (thanks Ignacio)


Modified:
   trunk/ChangeLog
   trunk/plugins/build-basic-autotools/program.c

Modified: trunk/plugins/build-basic-autotools/program.c
==============================================================================
--- trunk/plugins/build-basic-autotools/program.c	(original)
+++ trunk/plugins/build-basic-autotools/program.c	Sun Aug  3 20:40:43 2008
@@ -105,8 +105,6 @@
 	gsize count;
 	gchar **strv = *pstrv;
 	
-	g_return_val_if_fail (pos >= 0, FALSE);
-	
 	if (strv == NULL)
 	{
 		/* First argument, allocate memory */
@@ -122,7 +120,7 @@
 		count = g_strv_length (strv);
 
 		new_strv = g_new (gchar *, count + 2);
-		if (pos < count)
+		if ((pos >= 0) && (pos < count))
 			memcpy (&new_strv[pos + 1], &strv[pos], sizeof (gchar *) * (count - pos));
 		else
 			pos = count;
@@ -278,7 +276,7 @@
 	if (found == -1)
 	{
 		/* Append variable */
-		*build_strv_insert_before (&prog->envp, G_MAXSSIZE) = name_and_value;
+		*build_strv_insert_before (&prog->envp, -1) = name_and_value;
 	}
 	else
 	{



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