mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 17:56:17 +01:00
gio: Fix regression encoding an array of doubles
Take the simple slow path in this case. Encoding a double takes special precautions as you can see in append_value_to_blob() and friends. https://bugzilla.gnome.org/show_bug.cgi?id=732754
This commit is contained in:
parent
b6c1d696a9
commit
627b49b390
@ -1210,6 +1210,11 @@ get_type_fixed_size (const GVariantType *type)
|
|||||||
{
|
{
|
||||||
/* NB: we do not treat 'b' as fixed-size here because GVariant and
|
/* NB: we do not treat 'b' as fixed-size here because GVariant and
|
||||||
* D-Bus disagree about the size.
|
* D-Bus disagree about the size.
|
||||||
|
*
|
||||||
|
* In addition 'd' is encoded differently by GVariant and DBus, so
|
||||||
|
* we force (en|de)coding rather than direct use of fixed data.
|
||||||
|
*
|
||||||
|
* https://bugzilla.gnome.org/show_bug.cgi?id=732754
|
||||||
*/
|
*/
|
||||||
switch (*g_variant_type_peek_string (type))
|
switch (*g_variant_type_peek_string (type))
|
||||||
{
|
{
|
||||||
@ -1219,7 +1224,7 @@ get_type_fixed_size (const GVariantType *type)
|
|||||||
return 2;
|
return 2;
|
||||||
case 'i': case 'u': case 'h':
|
case 'i': case 'u': case 'h':
|
||||||
return 4;
|
return 4;
|
||||||
case 'x': case 't': case 'd':
|
case 'x': case 't':
|
||||||
return 8;
|
return 8;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user