Skip to content

Commit 18417ae

Browse files
committed
fix incompatibility with Zeex's sampgdk
fixes #54
1 parent 99e6ea8 commit 18417ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CCallback.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ void CCallback::ProcessCallbacks()
3838
for (set<AMX *>::iterator a = m_AmxList.begin(), end = m_AmxList.end(); a != end; ++a)
3939
{
4040
AMX *amx = (*a);
41-
int amx_index;
41+
int amx_index = -1;
4242

43-
if (amx_FindPublic(amx, query->Callback.Name.c_str(), &amx_index) == AMX_ERR_NONE)
43+
if (amx_FindPublic(amx, query->Callback.Name.c_str(), &amx_index) == AMX_ERR_NONE && amx_index >= 0)
4444
{
4545
cell amx_mem_addr = -1;
4646
CLog::Get()->StartCallback(query->Callback.Name.c_str());

0 commit comments

Comments
 (0)