You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If m_hEnemy is null then pEnemy will be uninitialized.
Note that CheckMeleeAttack1 is normally called only if m_hEnemy is not null, but it is possible for other AI routines to clear this handle between the initial check in the base AI code and this function.
In case anybody's wondering why a bunch of issues were just reopened: when i fixed issues in my own projects i marked them as having fixed these issues using Resolves #id syntax. Github retroactively closed a bunch of issues as a result. When i found out about this i stopped using that syntax but i've now gone through and reopened the issues that were closed in error.
CHGrunt::CheckMeleeAttack1 does not properly initialize a local variable:
halflife/dlls/hgrunt.cpp
Lines 413 to 434 in c7240b9
If
m_hEnemy
is null thenpEnemy
will be uninitialized.Note that
CheckMeleeAttack1
is normally called only ifm_hEnemy
is not null, but it is possible for other AI routines to clear this handle between the initial check in the base AI code and this function.To fix this the code needs to be changed to this:
The text was updated successfully, but these errors were encountered: