diff --git a/lib/libimhex/source/helpers/magic.cpp b/lib/libimhex/source/helpers/magic.cpp index d772261af..3995eae24 100644 --- a/lib/libimhex/source/helpers/magic.cpp +++ b/lib/libimhex/source/helpers/magic.cpp @@ -115,7 +115,7 @@ namespace hex::magic { std::string getDescription(prv::Provider *provider, u64 address, size_t size, bool firstEntryOnly) { std::vector buffer(std::min(provider->getSize(), size), 0x00); - provider->read(provider->getBaseAddress() + address, buffer.data(), buffer.size()); + provider->read(address, buffer.data(), buffer.size()); return getDescription(buffer, firstEntryOnly); } @@ -140,14 +140,14 @@ namespace hex::magic { std::string getMIMEType(prv::Provider *provider, u64 address, size_t size, bool firstEntryOnly) { std::vector buffer(std::min(provider->getSize(), size), 0x00); - provider->read(provider->getBaseAddress() + address, buffer.data(), buffer.size()); + provider->read(address, buffer.data(), buffer.size()); return getMIMEType(buffer, firstEntryOnly); } std::string getExtensions(prv::Provider *provider, u64 address, size_t size, bool firstEntryOnly) { std::vector buffer(std::min(provider->getSize(), size), 0x00); - provider->read(provider->getBaseAddress() + address, buffer.data(), buffer.size()); + provider->read(address, buffer.data(), buffer.size()); return getExtensions(buffer, firstEntryOnly); } @@ -172,7 +172,7 @@ namespace hex::magic { std::string getAppleCreatorType(prv::Provider *provider, u64 address, size_t size, bool firstEntryOnly) { std::vector buffer(std::min(provider->getSize(), size), 0x00); - provider->read(provider->getBaseAddress() + address, buffer.data(), buffer.size()); + provider->read(address, buffer.data(), buffer.size()); return getAppleCreatorType(buffer, firstEntryOnly); }