|
@@ -161,8 +161,7 @@ uint32_t ReadWord(const char* input, const char*& cursor, const char* end)
|
|
}
|
|
}
|
|
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
// ------------------------------------------------------------------------------------------------
|
|
-uint64_t ReadDoubleWord(const char* input, const char*& cursor, const char* end)
|
|
|
|
-{
|
|
|
|
|
|
+uint64_t ReadDoubleWord(const char* input, const char*& cursor, const char* end) {
|
|
const size_t k_to_read = sizeof(uint64_t);
|
|
const size_t k_to_read = sizeof(uint64_t);
|
|
if(Offset(cursor, end) < k_to_read) {
|
|
if(Offset(cursor, end) < k_to_read) {
|
|
TokenizeError("cannot ReadDoubleWord, out of bounds",input, cursor);
|
|
TokenizeError("cannot ReadDoubleWord, out of bounds",input, cursor);
|
|
@@ -176,7 +175,6 @@ uint64_t ReadDoubleWord(const char* input, const char*& cursor, const char* end)
|
|
return dword;
|
|
return dword;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
// ------------------------------------------------------------------------------------------------
|
|
// ------------------------------------------------------------------------------------------------
|
|
uint8_t ReadByte(const char* input, const char*& cursor, const char* end)
|
|
uint8_t ReadByte(const char* input, const char*& cursor, const char* end)
|
|
{
|
|
{
|
|
@@ -447,8 +445,9 @@ void TokenizeBinary(TokenList& output_tokens, const char* input, unsigned int le
|
|
const uint32_t flags = ReadWord(input, cursor, input + length);
|
|
const uint32_t flags = ReadWord(input, cursor, input + length);
|
|
|
|
|
|
const uint8_t padding_0 = ReadByte(input, cursor, input + length); // unused
|
|
const uint8_t padding_0 = ReadByte(input, cursor, input + length); // unused
|
|
|
|
+ (void) padding_0;
|
|
const uint8_t padding_1 = ReadByte(input, cursor, input + length); // unused
|
|
const uint8_t padding_1 = ReadByte(input, cursor, input + length); // unused
|
|
-
|
|
|
|
|
|
+ (void) padding_1;
|
|
while (cursor < input + length)
|
|
while (cursor < input + length)
|
|
{
|
|
{
|
|
if(!ReadScope(output_tokens, input, cursor, input + length, flags)) {
|
|
if(!ReadScope(output_tokens, input, cursor, input + length, flags)) {
|