diff options
| author | Brandon Miller <brandon@vector35.com> | 2024-04-17 13:55:59 -0400 |
|---|---|---|
| committer | Brandon Miller <bkmiller89@icloud.com> | 2024-04-25 10:56:18 -0400 |
| commit | 37f394946c75a6e0e4114a27db2f6ea8d03b143c (patch) | |
| tree | f2f00c202475145a0f89b803f216926e9214c962 /binaryreader.cpp | |
| parent | 2aa2be5c713a76c86118a225c5cae6ef3585412d (diff) | |
Moved TryReadPointer to core BinaryReader class
Diffstat (limited to 'binaryreader.cpp')
| -rw-r--r-- | binaryreader.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/binaryreader.cpp b/binaryreader.cpp index c49637f9..4b698310 100644 --- a/binaryreader.cpp +++ b/binaryreader.cpp @@ -314,14 +314,7 @@ bool BinaryReader::TryRead64(uint64_t& result) bool BinaryReader::TryReadPointer(uint64_t& result) { - size_t addressSize = m_view->GetAddressSize(); - if (addressSize > 8 || addressSize == 0) - return false; - - if (GetEndianness() == BigEndian) - return TryReadBEPointer(result); - - return TryReadLEPointer(result); + return BNReadPointer(m_view->GetObject(), m_stream, &result); } |
