Fix crash in EngFunc_TraceTexture (bug 4576, r=dvander).

This commit is contained in:
arkshine 2013-02-13 00:27:53 -08:00
parent e08f1dfccf
commit c439946a34

View File

@ -521,8 +521,8 @@ static cell AMX_NATIVE_CALL engfunc(AMX *amx, cell *params)
Vec2[2]=amx_ctof(cRet[2]); Vec2[2]=amx_ctof(cRet[2]);
temp = (char*)(*g_engfuncs.pfnTraceTexture)(INDEXENT2(index),Vec1,Vec2); temp = (char*)(*g_engfuncs.pfnTraceTexture)(INDEXENT2(index),Vec1,Vec2);
cRet = MF_GetAmxAddr(amx,params[6]); cRet = MF_GetAmxAddr(amx,params[6]);
MF_SetAmxString(amx, params[5], temp, cRet[0]); MF_SetAmxString(amx, params[5], (temp == NULL) ? "NoTexture" : temp, cRet[0]);
return 1; return (temp != NULL);
// pfnTraceSphere // pfnTraceSphere