mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
squash commits (#1479)
This commit is contained in:
@@ -128,10 +128,10 @@ AMFBaseValue* AMFDeserialize::ReadAmfArray(RakNet::BitStream& inStream) {
|
||||
auto arrayValue = new AMFArrayValue();
|
||||
|
||||
// Read size of dense array
|
||||
auto sizeOfDenseArray = (ReadU29(inStream) >> 1);
|
||||
const auto sizeOfDenseArray = (ReadU29(inStream) >> 1);
|
||||
// Then read associative portion
|
||||
while (true) {
|
||||
auto key = ReadString(inStream);
|
||||
const auto key = ReadString(inStream);
|
||||
// No more associative values when we encounter an empty string key
|
||||
if (key.size() == 0) break;
|
||||
arrayValue->Insert(key, Read(inStream));
|
||||
|
@@ -23,7 +23,7 @@ private:
|
||||
* @param inStream bitstream to read data from
|
||||
* @return The number as an unsigned 29 bit integer
|
||||
*/
|
||||
uint32_t ReadU29(RakNet::BitStream& inStream);
|
||||
static uint32_t ReadU29(RakNet::BitStream& inStream);
|
||||
|
||||
/**
|
||||
* @brief Reads a string from a bitstream
|
||||
|
@@ -42,6 +42,7 @@ class AMFValue : public AMFBaseValue {
|
||||
public:
|
||||
AMFValue() = default;
|
||||
AMFValue(const ValueType value) : m_Data{ value } {}
|
||||
|
||||
virtual ~AMFValue() override = default;
|
||||
|
||||
[[nodiscard]] constexpr eAmf GetValueType() const noexcept override;
|
||||
|
Reference in New Issue
Block a user