fixed bug for amb266
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40762
This commit is contained in:
parent
3851dc9243
commit
9d9369079a
@ -589,7 +589,8 @@ static cell_t GetWeaponName(IPluginContext *pContext, const cell_t *params)
|
|||||||
return pContext->ThrowNativeError("IPlayerInfo not supported by game");
|
return pContext->ThrowNativeError("IPlayerInfo not supported by game");
|
||||||
}
|
}
|
||||||
|
|
||||||
pContext->StringToLocalUTF8(params[2], static_cast<size_t>(params[3]), pInfo->GetWeaponName(), NULL);
|
const char *weapon = pInfo->GetWeaponName();
|
||||||
|
pContext->StringToLocalUTF8(params[2], static_cast<size_t>(params[3]), weapon ? weapon : "", NULL);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -612,7 +613,8 @@ static cell_t GetModelName(IPluginContext *pContext, const cell_t *params)
|
|||||||
return pContext->ThrowNativeError("IPlayerInfo not supported by game");
|
return pContext->ThrowNativeError("IPlayerInfo not supported by game");
|
||||||
}
|
}
|
||||||
|
|
||||||
pContext->StringToLocalUTF8(params[2], static_cast<size_t>(params[3]), pInfo->GetModelName(), NULL);
|
const char *model = pInfo->GetModelName();
|
||||||
|
pContext->StringToLocalUTF8(params[2], static_cast<size_t>(params[3]), model ? model : "", NULL);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user