Fixed array index overflow.

This commit is contained in:
Eric Pouech 2004-12-13 12:01:58 +00:00 committed by Alexandre Julliard
parent dc7540635e
commit c164e069a8
2 changed files with 2 additions and 3 deletions

View File

@ -341,7 +341,6 @@ HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlay2AImpl* This, DPID dpidServer )
lpMsgBody->unknown4[9] = 0x0;
lpMsgBody->unknown4[10] = 0x0;
lpMsgBody->unknown4[11] = 0x0;
lpMsgBody->unknown4[12] = 0x0;
lpMsgBody->unknown5[0] = 0x0;
lpMsgBody->unknown5[1] = 0x0;

View File

@ -56,9 +56,9 @@ time_t ConvertTimeString(LPCWSTR asctime)
strncpyW(tmpChar, asctime, TIME_STRING_LEN);
/* Assert that the string is the expected length */
if (tmpChar[TIME_STRING_LEN] != '\0')
if (tmpChar[TIME_STRING_LEN - 1] != '\0')
{
tmpChar[TIME_STRING_LEN] = '\0';
tmpChar[TIME_STRING_LEN - 1] = '\0';
FIXME("\n");
}