changeset 8140:47046ceedf0b

[gaim-migrate @ 8846] Thanks to Zaheer Merali for pointing this out ... PPC/AMD64/etc. should be markedly more usable now. ;-) committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Mon, 19 Jan 2004 17:40:02 +0000
parents d09cb56dcbea
children 5efe3d9cd552
files src/signals.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/signals.c	Sun Jan 18 04:56:01 2004 +0000
+++ b/src/signals.c	Mon Jan 19 17:40:02 2004 +0000
@@ -485,6 +485,7 @@
 	GaimSignalHandlerData *handler_data;
 	void *ret_val = NULL;
 	GList *l, *l_next;
+	va_list tmp;
 
 	g_return_val_if_fail(instance != NULL, NULL);
 	g_return_val_if_fail(signal   != NULL, NULL);
@@ -510,16 +511,18 @@
 
 		handler_data = (GaimSignalHandlerData *)l->data;
 
+		va_copy(tmp, args);
 		if (handler_data->use_vargs)
 		{
 			ret_val = ((void *(*)(va_list, void *))handler_data->cb)(
-				args, handler_data->data);
+				tmp, handler_data->data);
 		}
 		else
 		{
-			signal_data->marshal(handler_data->cb, args,
+			signal_data->marshal(handler_data->cb, tmp,
 								 handler_data->data, &ret_val);
 		}
+		va_end(tmp);
 	}
 
 	return ret_val;