Fix bug in get for arrays

Fixes #34
This commit is contained in:
Harry T. Vennik 2017-12-09 16:34:31 +01:00
parent 0841ac69de
commit 9c34742d96

View file

@ -432,7 +432,7 @@ struct DBusAny {
if (is(T == const(DBusAny)[])) { if (is(T == const(DBusAny)[])) {
enforce((type == 'a' && signature != "y") || type == 'r', new TypeMismatchException( enforce((type == 'a' && signature != "y") || type == 'r', new TypeMismatchException(
"Cannot get a " ~ T.stringof ~ " from a DBusAny with" ~ " a value of DBus type '" ~ this.typeSig ~ "'.", "Cannot get a " ~ T.stringof ~ " from a DBusAny with" ~ " a value of DBus type '" ~ this.typeSig ~ "'.",
typeCode!T, type)); 'a', type));
return array; return array;
} }
@ -442,7 +442,7 @@ struct DBusAny {
if (is(T == const(ubyte)[])) { if (is(T == const(ubyte)[])) {
enforce(type == 'a' && signature == "y", new TypeMismatchException( enforce(type == 'a' && signature == "y", new TypeMismatchException(
"Cannot get a " ~ T.stringof ~ " from a DBusAny with" ~ " a value of DBus type '" ~ this.typeSig ~ "'.", "Cannot get a " ~ T.stringof ~ " from a DBusAny with" ~ " a value of DBus type '" ~ this.typeSig ~ "'.",
typeCode!T, type)); 'a', type));
return binaryData; return binaryData;
} }