From 1680f1fb403db648c1a9ebc45873df44dcfde6ef Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Tue, 12 Jun 2007 18:53:32 +0000 Subject: 2007-06-12 Havoc Pennington * dbus/dbus-marshal-recursive.c (write_or_verify_typecode): improve the warning a bit if you write extra data into a message --- dbus/dbus-marshal-recursive.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'dbus/dbus-marshal-recursive.c') diff --git a/dbus/dbus-marshal-recursive.c b/dbus/dbus-marshal-recursive.c index d47d200b..b16f4ea5 100644 --- a/dbus/dbus-marshal-recursive.c +++ b/dbus/dbus-marshal-recursive.c @@ -1702,8 +1702,12 @@ write_or_verify_typecode (DBusTypeWriter *writer, if (expected != typecode) { - _dbus_warn_check_failed ("Array or variant type requires that type %s be written, but %s was written\n", - _dbus_type_to_string (expected), _dbus_type_to_string (typecode)); + if (expected != DBUS_TYPE_INVALID) + _dbus_warn_check_failed ("Array or variant type requires that type %s be written, but %s was written\n", + _dbus_type_to_string (expected), _dbus_type_to_string (typecode)); + else + _dbus_warn_check_failed ("Array or variant type wasn't expecting any more values to be written into it, but a value %s was written\n", + _dbus_type_to_string (typecode)); _dbus_assert_not_reached ("bad type inserted somewhere inside an array or variant"); } } -- cgit