diff --git a/Marshal.cs b/Marshal.cs index 64ee7be..90b09f7 100644 --- a/Marshal.cs +++ b/Marshal.cs @@ -245,8 +245,8 @@ public static class Marshal [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T MarshalStructure(byte[] bytes) where T : struct { - if(!(typeof(T).GetCustomAttribute(typeof(MarshallingPropertiesAttribute)) is MarshallingPropertiesAttribute - properties)) + if(typeof(T).GetCustomAttribute(typeof(MarshallingPropertiesAttribute)) is not MarshallingPropertiesAttribute + properties) return ByteArrayToStructureLittleEndian(bytes); return properties.Endian switch