Yeah, I guess so.

Though the CUserMessages::IsValidIndex function does the same check, but
does if(i >= 0 && i < m_Size).

Either way, one of these is wrong, because the GetUserMessageInfo should be
returning false when I try to get the information for an index that doesn't
exist.


-----Original Message-----
From: Karl "XP-Cagey" Patrick [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 16, 2005 11:20 AM
To: [email protected]
Subject: RE: [hlcoders] Minor bug with GetUserMessageInfo.

If index 0 is valid (which the first check indicates is true), N items would
be in indices 0 through N-1 and the original check is correct.

> "if ( index < 0 || index >= (int)m_UserMessages.Count() )"

> Shouldn't this be:

> "if ( index < 0 || index > (int)m_UserMessages.Count() )"

> Or am I mistaken?

> Thanks.

> - voogru.


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to