mirror of
https://github.com/XLabsProject/s1x-client.git
synced 2023-08-02 15:02:12 +02:00
Verify mapped binary base #221
This commit is contained in:
parent
56633a8dcc
commit
091176d85d
@ -36,7 +36,13 @@ FARPROC loader::load_library(const std::string& filename) const
|
||||
const auto target = utils::nt::library::load(filename);
|
||||
if (!target)
|
||||
{
|
||||
throw std::runtime_error("Failed to map binary!");
|
||||
throw std::runtime_error{"Failed to map binary!"};
|
||||
}
|
||||
|
||||
const auto base = size_t(target.get_ptr());
|
||||
if(base != 0x140000000)
|
||||
{
|
||||
throw std::runtime_error{utils::string::va("Binary was mapped at 0x%llX (instead of 0x%llX). Something is severely broken :(", base, 0x140000000)};
|
||||
}
|
||||
|
||||
this->load_imports(target, target);
|
||||
|
Loading…
Reference in New Issue
Block a user