Fix some errors (#1020)

Fix some critical errors
This commit is contained in:
Unreal Karaulov
2021-12-03 00:47:57 +03:00
committed by GitHub
parent 5dcda02b65
commit 3cda059669
13 changed files with 37 additions and 23 deletions

View File

@ -262,10 +262,10 @@ static cell AMX_NATIVE_CALL cwpn_dmg(AMX *amx, cell *params){ // wid,att,vic,dmg
CPlayer* pAtt = GET_PLAYER_POINTER_I(att);
CPlayer* pVic = GET_PLAYER_POINTER_I(vic);
if ( !pAtt ) pAtt = pVic;
pVic->pEdict->v.dmg_inflictor = NULL;
pAtt->saveHit( pVic , weapon , dmg, aim );
if ( !pAtt ) pAtt = pVic;
int TA = 0;
if ( (pVic->pEdict->v.team == pAtt->pEdict->v.team ) && ( pVic != pAtt) )
TA = 1;

View File

@ -47,7 +47,7 @@ bool isModuleActive(){
bool util_strncmp( const char *sz1, const char *sz2, int size){
int i = 0;
while( sz1[i] && i<=size){
while( i<=size && sz1[i] ){
if ( sz1[i] != sz2[i] )
return false;
i++;