Skip to content

Commit

Permalink
Update patch address check
Browse files Browse the repository at this point in the history
  • Loading branch information
elishacloud committed Dec 2, 2017
1 parent 5d765c5 commit 144fe8f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion BuildNo.rc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define BUILD_NUMBER 152
#define BUILD_NUMBER 154
4 changes: 2 additions & 2 deletions NoCDPatch/nocd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void DisableCDCheck()
void *CDCheckAddr = GetAddressOfData(FuncBlock, 7);

// Address found
if (CDCheckAddr)
if (CDCheckAddr && (DWORD)CDCheckAddr < 0x00FFFFFF)
{
// Log message
Log() << "Found CD check function at address: " << CDCheckAddr;
Expand All @@ -50,6 +50,6 @@ void DisableCDCheck()
}
else
{
Log() << "Could not find pointer address in memory!";
Log() << "Could not find CD check function address in memory!";
}
}
4 changes: 2 additions & 2 deletions SFX/sfx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void UpdateSFXAddr()
void *sfxAddr = GetAddressOfData(sfxBlock, 24);

// Address found
if (sfxAddr)
if (sfxAddr && (DWORD)sfxAddr < 0x00FFFFFF)
{
// Log message
Log() << "Found SFX pointer address at: " << sfxAddr;
Expand Down Expand Up @@ -125,6 +125,6 @@ void UpdateSFXAddr()
}
else
{
Log() << "Could not find pointer address in memory!";
Log() << "Could not find SFX pointer address in memory!";
}
}

0 comments on commit 144fe8f

Please sign in to comment.