| 449 | } |
| 450 | |
| 451 | static bool ReadU32(const uint8_t* data, uint32_t size, uint32_t* offset, uint32_t* out) |
| 452 | { |
| 453 | if (*offset + 4 > size) |
| 454 | return false; |
| 455 | *out = (uint32_t) ((data[*offset] << 24) | |
| 456 | (data[*offset + 1] << 16) | |
| 457 | (data[*offset + 2] << 8) | |
| 458 | data[*offset + 3]); |
| 459 | *offset += 4; |
| 460 | return true; |
| 461 | } |
| 462 | |
| 463 | static bool ReadName(const uint8_t* data, uint32_t size, uint32_t* offset, std::string* out) |
| 464 | { |