mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 14:55:36 +03:00
Merge pull request #277 from Arkshine/fix/potential-issues
Fix some potential issues
This commit is contained in:
commit
4563f56e77
@ -1423,9 +1423,6 @@ static cell AMX_NATIVE_CALL get_plugin(AMX *amx, cell *params) /* 11 param */
|
|||||||
set_amxstring(amx, params[8], a->getAuthor(), params[9]);
|
set_amxstring(amx, params[8], a->getAuthor(), params[9]);
|
||||||
set_amxstring(amx, params[10], a->getStatus(), params[11]);
|
set_amxstring(amx, params[10], a->getStatus(), params[11]);
|
||||||
|
|
||||||
return a->getId();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (params[0] / sizeof(cell) >= 12)
|
if (params[0] / sizeof(cell) >= 12)
|
||||||
{
|
{
|
||||||
cell *jit_info = get_amxaddr(amx, params[12]);
|
cell *jit_info = get_amxaddr(amx, params[12]);
|
||||||
@ -1436,6 +1433,9 @@ static cell AMX_NATIVE_CALL get_plugin(AMX *amx, cell *params) /* 11 param */
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return a->getId();
|
||||||
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ class CObjective {
|
|||||||
public:
|
public:
|
||||||
int count;
|
int count;
|
||||||
objinfo_t obj[12];
|
objinfo_t obj[12];
|
||||||
inline void Clear() { count = 0; memset(obj,0,sizeof(objinfo_s)); }
|
inline void Clear() { count = 0; memset(obj,0,sizeof(obj)); }
|
||||||
void SetKeyValue( int index, char *keyname, char *value );
|
void SetKeyValue( int index, char *keyname, char *value );
|
||||||
|
|
||||||
void InitObj(int dest = MSG_ALL , edict_t* ed = NULL);
|
void InitObj(int dest = MSG_ALL , edict_t* ed = NULL);
|
||||||
|
@ -152,10 +152,13 @@ void Client_Health_End(void* mValue)
|
|||||||
if ( !isModuleActive() )
|
if ( !isModuleActive() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!mPlayer)
|
||||||
|
return;
|
||||||
|
|
||||||
edict_t *enemy = mPlayer->pEdict->v.dmg_inflictor;
|
edict_t *enemy = mPlayer->pEdict->v.dmg_inflictor;
|
||||||
int damage = (int)mPlayer->pEdict->v.dmg_take;
|
int damage = (int)mPlayer->pEdict->v.dmg_take;
|
||||||
|
|
||||||
if ( !mPlayer || !damage || !enemy )
|
if (!damage || !enemy)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int weapon = 0;
|
int weapon = 0;
|
||||||
|
@ -583,7 +583,7 @@ int RegEx::Replace(char *text, size_t textMaxLen, const char *replace, size_t re
|
|||||||
*/
|
*/
|
||||||
if (flags & PCRE_DUPNAMES)
|
if (flags & PCRE_DUPNAMES)
|
||||||
{
|
{
|
||||||
memset(ovector, 0, REGEX_MAX_SUBPATTERNS);
|
memset(ovector, 0, REGEX_MAX_SUBPATTERNS * sizeof(int));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pcre_copy_named_substring needs a vector containing sub-patterns ranges
|
* pcre_copy_named_substring needs a vector containing sub-patterns ranges
|
||||||
|
Loading…
Reference in New Issue
Block a user