Skip to content

Commit 4f08eb2

Browse files
committed
Fixup "Serialize kv2 byte arrays as "binary" at all times"
1 parent 4535a5f commit 4f08eb2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Codecs/KeyValues2.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ void WriteAttribute(string name, Type type, object value, bool in_array)
178178
// TODO: subclass check in this method like above - and in all other places with == typeof(Element)
179179
inner_type = Datamodel.GetArrayInnerType(type);
180180

181-
if (inner_type == typeof(byte))
181+
if (inner_type == typeof(byte) && type == typeof(byte[]))
182182
inner_type = null; // serialize as binary at all times
183183

184184
/*

0 commit comments

Comments
 (0)