Skip to content

Commit

Permalink
fix incompatibility with Zeex's sampgdk
Browse files Browse the repository at this point in the history
fixes #54
  • Loading branch information
maddinat0r committed Feb 5, 2015
1 parent 99e6ea8 commit 18417ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CCallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ void CCallback::ProcessCallbacks()
for (set<AMX *>::iterator a = m_AmxList.begin(), end = m_AmxList.end(); a != end; ++a)
{
AMX *amx = (*a);
int amx_index;
int amx_index = -1;

if (amx_FindPublic(amx, query->Callback.Name.c_str(), &amx_index) == AMX_ERR_NONE)
if (amx_FindPublic(amx, query->Callback.Name.c_str(), &amx_index) == AMX_ERR_NONE && amx_index >= 0)
{
cell amx_mem_addr = -1;
CLog::Get()->StartCallback(query->Callback.Name.c_str());
Expand Down

0 comments on commit 18417ae

Please sign in to comment.