Skip to content

Commit

Permalink
Fix for Garry's Mod update.
Browse files Browse the repository at this point in the history
Bumped revision number.
  • Loading branch information
danielga committed Aug 17, 2018
1 parent f9481ce commit 5e3302d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 37 deletions.
4 changes: 2 additions & 2 deletions include/modules/serversecure.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ require("serversecure.core")

local format, match, band, rshift = string.format, string.match, bit.band, bit.rshift

serversecure.Version = "serversecure 1.5.19"
serversecure.VersionNum = 10519
serversecure.Version = "serversecure 1.5.20"
serversecure.VersionNum = 10520

function serversecure.IPToString(uint)
if not uint then
Expand Down
12 changes: 3 additions & 9 deletions source/filecheck.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <filecheck.hpp>
#include <main.hpp>
#include <GarrysMod/Lua/Interface.h>
#include <GarrysMod/LuaHelpers.hpp>
#include <GarrysMod/Lua/Helpers.hpp>
#include <stdint.h>
#include <stddef.h>
#include <string>
Expand All @@ -26,22 +26,16 @@ namespace filecheck
#if defined SYSTEM_WINDOWS

static const char CNetChan__IsValidFileForTransfer_sig[] =
"\x55\x8B\xEC\x53\x8B\x5D\x08\x85\xDB\x0F\x84\x2A\x2A\x2A\x2A\x8A\x03";
"\x55\x8B\xEC\x53\x8B\x5D\x08\x56\x57\x85\xDB\x0F\x84";
static const size_t CNetChan__IsValidFileForTransfer_siglen =
sizeof( CNetChan__IsValidFileForTransfer_sig ) - 1;

#elif defined SYSTEM_LINUX
#elif defined SYSTEM_LINUX || defined SYSTEM_MACOSX

static const char CNetChan__IsValidFileForTransfer_sig[] =
"@_ZN8CNetChan22IsValidFileForTransferEPKc";
static const size_t CNetChan__IsValidFileForTransfer_siglen = 0;

#elif defined SYSTEM_MACOSX

static const char CNetChan__IsValidFileForTransfer_sig[] =
"@__ZN8CNetChan22IsValidFileForTransferEPKc";
static const size_t CNetChan__IsValidFileForTransfer_siglen = 0;

#endif

static CNetChan__IsValidFileForTransfer_t CNetChan__IsValidFileForTransfer_original = nullptr;
Expand Down
7 changes: 1 addition & 6 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,11 @@ namespace global
"\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\xD8\x6D\x24\x83\x4D\xEC\x10";
static const size_t IServer_siglen = sizeof( IServer_sig ) - 1;

#elif defined SYSTEM_LINUX
#elif defined SYSTEM_LINUX || defined SYSTEM_MACOSX

static const char IServer_sig[] = "@sv";
static const size_t IServer_siglen = 0;

#elif defined SYSTEM_MACOSX

static const char IServer_sig[] = "@_sv";
static const size_t IServer_siglen = 0;

#endif

SourceSDK::FactoryLoader engine_loader( "engine", false, true, "bin/" );
Expand Down
24 changes: 4 additions & 20 deletions source/netfilter/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ namespace netfilter

static const char operating_system_char = 'w';

#elif defined SYSTEM_LINUX
#elif defined SYSTEM_LINUX || defined SYSTEM_MACOSX

static const char SteamGameServerAPIContext_sym[] = "@_ZL27s_SteamGameServerAPIContext";
static const size_t SteamGameServerAPIContext_symlen = 0;
Expand All @@ -195,27 +195,11 @@ namespace netfilter
static const char net_sockets_sig[] = "@_ZL11net_sockets";
static const size_t net_sockets_siglen = 0;

#ifdef SYSTEM_LINUX
static const char operating_system_char = 'l';

typedef int SOCKET;

static const SOCKET INVALID_SOCKET = -1;

#elif defined SYSTEM_MACOSX

static const char SteamGameServerAPIContext_sym[] = "@__ZL27s_SteamGameServerAPIContext";
static const size_t SteamGameServerAPIContext_symlen = 0;

static const char FileSystemFactory_sym[] = "@__Z17FileSystemFactoryPKcPi";
static const size_t FileSystemFactory_symlen = 0;

static const char g_pFullFileSystem_sym[] = "@_g_pFullFileSystem";
static const size_t g_pFullFileSystem_symlen = 0;

static const char net_sockets_sig[] = "@__ZL11net_sockets";
static const size_t net_sockets_siglen = 0;

#else
static const char operating_system_char = 'm';
#endif

typedef int SOCKET;

Expand Down

0 comments on commit 5e3302d

Please sign in to comment.