From d386a5b6242eeb0a919cedea81e778f1b7c06aec Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 7 Apr 2007 04:31:23 +0000 Subject: [PATCH] whoops, fixed a versioning bug --HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40372 --- sourcemm/sourcemm.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sourcemm/sourcemm.cpp b/sourcemm/sourcemm.cpp index cb48a30..d11a01b 100644 --- a/sourcemm/sourcemm.cpp +++ b/sourcemm/sourcemm.cpp @@ -58,7 +58,8 @@ bool bGameInit = false; SourceHook::List gamedll_list; SourceHook::CallClass *g_GameDllPatch; int g_GameDllVersion = 0; -const char VSPIFACE[] = "ISERVERPLUGINCALLBACKS"; +const char VSPIFACE_001[] = "ISERVERPLUGINCALLBACKS001"; +const char VSPIFACE_002[] = "ISERVERPLUGINCALLBACKS002"; const char GAMEINFO_PATH[] = "|gameinfo_path|"; void ClearGamedllList(); @@ -226,13 +227,16 @@ SMM_API void *CreateInterface(const char *iface, int *ret) return NULL; } - if (strncmp(iface, VSPIFACE, 22) == 0) + /* We check these separately because we can't reply + * unless our interface version really matches. + */ + if ((strcmp(iface, VSPIFACE_002) == 0) + || strcmp(iface, VSPIFACE_001) == 0) { if (ret) { *ret = IFACE_OK; } - return &g_VspListener; }