Fix issues with MetalClaw reader iteration too many fields
This commit is contained in:
@@ -72,7 +72,6 @@ int MetalClawReader::op(const char*, ox::bstring<L> *val) {
|
||||
size_t size = 0;
|
||||
if (m_buffIt + sizeof(StringLength) < m_buffLen) {
|
||||
size = ox::std::bigEndianAdapt(*((StringLength*) &m_buff[m_buffIt]));
|
||||
m_field++;
|
||||
m_buffIt += sizeof(StringLength);
|
||||
} else {
|
||||
err |= MC_BUFFENDED;
|
||||
@@ -83,7 +82,6 @@ int MetalClawReader::op(const char*, ox::bstring<L> *val) {
|
||||
if (m_buffIt + size < m_buffLen) {
|
||||
ox_memcpy(val, &m_buff[m_buffIt], size);
|
||||
m_buffIt += size;
|
||||
m_field++;
|
||||
} else {
|
||||
err |= MC_BUFFENDED;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ using namespace ox;
|
||||
|
||||
struct TestStructNest {
|
||||
bool Bool = false;
|
||||
int Int = 0;
|
||||
uint32_t Int = 0;
|
||||
bstring<32> String = "";
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ struct TestStruct {
|
||||
bool Bool = false;
|
||||
int32_t Int = 0;
|
||||
bstring<32> String = "";
|
||||
int List[4] = {0, 0, 0 , 0};
|
||||
uint32_t List[4] = {0, 0, 0 , 0};
|
||||
TestStructNest Struct;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user