| 483 | } |
| 484 | |
| 485 | static bool ReadU32(const uint8_t* data, uint32_t size, uint32_t* offset, uint32_t* out) |
| 486 | { |
| 487 | if (*offset + 4 > size) |
| 488 | return false; |
| 489 | *out = (uint32_t) ((data[*offset] << 24) | |
| 490 | (data[*offset + 1] << 16) | |
| 491 | (data[*offset + 2] << 8) | |
| 492 | data[*offset + 3]); |
| 493 | *offset += 4; |
| 494 | return true; |
| 495 | } |
| 496 | |
| 497 | static bool WriteU16(uint8_t* data, uint32_t size, uint32_t* offset, uint16_t value) |
| 498 | { |
no outgoing calls
no test coverage detected