| 337 | |
| 338 | |
| 339 | bool BinaryReader::TryReadLEPointer(uint64_t& result) |
| 340 | { |
| 341 | size_t addressSize = m_view->GetAddressSize(); |
| 342 | switch (addressSize) |
| 343 | { |
| 344 | case 1: |
| 345 | { |
| 346 | uint8_t r; |
| 347 | if (!BNRead8(m_stream, &r)) |
| 348 | return false; |
| 349 | result = r; |
| 350 | break; |
| 351 | } |
| 352 | case 2: |
| 353 | { |
| 354 | uint16_t r; |
| 355 | if (!BNReadLE16(m_stream, &r)) |
| 356 | return false; |
| 357 | result = r; |
| 358 | break; |
| 359 | } |
| 360 | case 4: |
| 361 | { |
| 362 | uint32_t r; |
| 363 | if (!BNReadLE32(m_stream, &r)) |
| 364 | return false; |
| 365 | result = r; |
| 366 | break; |
| 367 | } |
| 368 | case 8: |
| 369 | { |
| 370 | if (!BNReadLE64(m_stream, &result)) |
| 371 | return false; |
| 372 | break; |
| 373 | } |
| 374 | default: |
| 375 | { |
| 376 | return false; |
| 377 | } |
| 378 | } |
| 379 | return true; |
| 380 | } |
| 381 | |
| 382 | |
| 383 | bool BinaryReader::TryReadBE16(uint16_t& result) |
nothing calls this directly
no test coverage detected