diff --git a/dCommon/AMFDeserialize.cpp b/dCommon/AMFDeserialize.cpp index 9eee1f12..648d1ed1 100644 --- a/dCommon/AMFDeserialize.cpp +++ b/dCommon/AMFDeserialize.cpp @@ -13,10 +13,8 @@ AMFBaseValue* AMFDeserialize::Read(RakNet::BitStream* inStream) { if (!inStream) return nullptr; AMFBaseValue* returnValue = nullptr; // Read in the value type from the bitStream - uint8_t i; - inStream->Read(i); - if (i > static_cast(eAmf::Dictionary)) return nullptr; - eAmf marker = static_cast(i); + eAmf marker; + inStream->Read(marker); // Based on the typing, create the value associated with that and return the base value class switch (marker) { case eAmf::Undefined: {