Kart discrepancies

This commit is contained in:
James R 2019-08-17 10:33:14 -07:00
parent 91502f1499
commit 19dd9a3c14
3 changed files with 9 additions and 9 deletions

View File

@ -117,7 +117,7 @@ static UINT8 resynch_local_inprogress = false; // WE are desynched and getting p
static UINT8 player_joining = false;
UINT8 hu_resynching = 0;
UINT8 adminpassmd5[MD5_LEN];
UINT8 adminpassmd5[16];
boolean adminpasswordset = false;
// Client specific
@ -3764,7 +3764,7 @@ static void HandlePacketFromPlayer(SINT8 node)
XBOXSTATIC INT32 netconsole;
XBOXSTATIC tic_t realend, realstart;
XBOXSTATIC UINT8 *pak, *txtpak, numtxtpak;
XBOXSTATIC UINT8 finalmd5[MD5_LEN];/* Well, it's the cool thing to do? */
XBOXSTATIC UINT8 finalmd5[16];/* Well, it's the cool thing to do? */
FILESTAMP
txtpak = NULL;
@ -3969,7 +3969,7 @@ FILESTAMP
break;
#ifndef NOMD5
if (doomcom->datalength < MD5_LEN)/* ignore partial sends */
if (doomcom->datalength < 16)/* ignore partial sends */
break;
if (!adminpasswordset)
@ -3979,9 +3979,9 @@ FILESTAMP
}
// Do the final pass to compare with the sent md5
D_MD5PasswordPass(adminpassmd5, MD5_LEN, va("PNUM%02d", netconsole), &finalmd5);
D_MD5PasswordPass(adminpassmd5, 16, va("PNUM%02d", netconsole), &finalmd5);
if (!memcmp(netbuffer->u.md5sum, finalmd5, MD5_LEN))
if (!memcmp(netbuffer->u.md5sum, finalmd5, 16))
{
CONS_Printf(M_GetText("%s passed authentication.\n"), player_names[netconsole]);
COM_BufInsertText(va("promote %d\n", netconsole)); // do this immediately

View File

@ -401,7 +401,7 @@ typedef struct
UINT8 textcmd[MAXTEXTCMD+1]; // 66049 bytes (wut??? 64k??? More like 257 bytes...)
filetx_pak filetxpak; // 139 bytes
clientconfig_pak clientcfg; // 136 bytes
UINT8 md5sum[MD5_LEN];
UINT8 md5sum[16];
serverinfo_pak serverinfo; // 1024 bytes
serverrefuse_pak serverrefuse; // 65025 bytes (somehow I feel like those values are garbage...)
askinfo_pak askinfo; // 61 bytes
@ -534,6 +534,6 @@ void D_MD5PasswordPass(const UINT8 *buffer, size_t len, const char *salt, void *
extern UINT8 hu_resynching;
extern UINT8 adminpassmd5[MD5_LEN];
extern UINT8 adminpassmd5[16];
extern boolean adminpasswordset;
#endif

View File

@ -2710,12 +2710,12 @@ static void Command_Login_f(void)
D_MD5PasswordPass((const UINT8 *)pw, strlen(pw), BASESALT, &netbuffer->u.md5sum);
// Do the final pass to get the comparison the server will come up with
D_MD5PasswordPass(netbuffer->u.md5sum, MD5_LEN, va("PNUM%02d", consoleplayer), &netbuffer->u.md5sum);
D_MD5PasswordPass(netbuffer->u.md5sum, 16, va("PNUM%02d", consoleplayer), &netbuffer->u.md5sum);
CONS_Printf(M_GetText("Sending login... (Notice only given if password is correct.)\n"));
netbuffer->packettype = PT_LOGIN;
HSendPacket(servernode, true, 0, MD5_LEN);
HSendPacket(servernode, true, 0, 16);
#endif
}