Skip to content

Commit

Permalink
tweak(five): error out cleanly for the errorcodes.txt failure condition
Browse files Browse the repository at this point in the history
  • Loading branch information
blattersturm committed Jan 20, 2022
1 parent ee44eaf commit e1ce7e2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions code/components/rage-device-five/src/HookInitialMount.cpp
Expand Up @@ -162,8 +162,23 @@ static void PackfileEncryptionError()
ToNarrow(MakeRelativeGamePath(L"")));
}

static void CorruptedErrorCodes()
{
FatalError("Corrupted Error Code File.\n"
"Currently, the installation directory %s is being used.\n\n"
"Please verify your game files, see http://rsg.ms/verify for more information on doing so.",
ToNarrow(MakeRelativeGamePath(L"")));
}

static HookFunction hookFunction([] ()
{
// errorcodes loading failure
{
auto location = hook::get_pattern<char>("C3 33 D2 33 C9 E8 ? ? ? ? ? 33 D2", 5);
hook::call(location, CorruptedErrorCodes);
hook::call(location + 10, CorruptedErrorCodes);
}

// increase non-DLC fiDevice mount limit
{
// GTA project initialization code, arxan-obfuscated
Expand Down

0 comments on commit e1ce7e2

Please sign in to comment.