Skip to content

Commit

Permalink
1.2 patch
Browse files Browse the repository at this point in the history
  • Loading branch information
maximegmd committed Mar 29, 2021
1 parent c78bafc commit 4cc912a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ void Image::Initialize()
static uint8_t s_Guid110[] = { 0xE0, 0xC2, 0x94, 0x64, 0x5C, 0xB4, 0x32, 0x45, 0x95, 0x10, 0x09, 0xA1, 0x0F, 0xB2, 0x53, 0xF8 };
static uint8_t s_Guid111[] = { 0x8C, 0x13, 0x59, 0xA9, 0x7E, 0x6E, 0x49, 0x4F, 0x82, 0xF9, 0xCF, 0x58, 0x71, 0x6B, 0x7D, 0x3A };
static uint8_t s_Guid112[] = { 0x7B, 0x51, 0xF5, 0x2C, 0x87, 0xD0, 0xFF, 0x40, 0x83, 0xE5, 0xAA, 0x6C, 0x07, 0xE9, 0x95, 0x20 };
static uint8_t s_Guid120[] = { 0x17, 0x1B, 0x2C, 0x4A, 0xC7, 0xA5, 0x38, 0x49, 0x8C, 0x43, 0x20, 0xFC, 0x47, 0x14, 0xF2, 0x33 };

mem::module mainModule = mem::module::main();

Expand Down Expand Up @@ -61,6 +62,8 @@ void Image::Initialize()
version = MakeVersion(1, 11);
else if (memcmp(&pdb_info->Guid, s_Guid112, 16) == 0)
version = MakeVersion(1, 12);
else if (memcmp(&pdb_info->Guid, s_Guid120, 16) == 0)
version = MakeVersion(1, 20);
else
{
for (auto c : pdb_info->Guid)
Expand Down
4 changes: 2 additions & 2 deletions src/Image.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ struct Image

static std::tuple<uint32_t, uint16_t> GetSupportedVersion() noexcept
{
return std::make_tuple(1, 12);
return std::make_tuple(1, 20);
}

static uint64_t MakeVersion(uint32_t aMajor, uint16_t aMinor) noexcept
{
return static_cast<uint64_t>(aMajor) << 32 | static_cast<uint64_t>(aMinor) << 16;
}

std::tuple<uint32_t, uint16_t> GetVersion() const noexcept
[[nodiscard]] std::tuple<uint32_t, uint16_t> GetVersion() const noexcept
{
return std::make_tuple(static_cast<uint32_t>(version >> 32), static_cast<uint16_t>((version >> 16) & 0xFFFF));
}
Expand Down
3 changes: 2 additions & 1 deletion src/scripting/Scripting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,8 @@ sol::protected_function Scripting::InternalIndex(const std::string& acName, sol:
auto obj = make_object(state, [this, name = acName](sol::variadic_args aArgs, sol::this_environment aThisEnv, sol::this_state aState)
{
std::string result;
auto code = this->Execute(name, aArgs, result, aState);
auto code = this->Execute(name, aArgs, result, aState);

if(!code)
{
const sol::environment cEnv = aThisEnv;
Expand Down
2 changes: 1 addition & 1 deletion vendor/RED4ext.SDK

0 comments on commit 4cc912a

Please sign in to comment.