From 653c29d0bd1bcd398a5e2076d37360875caa38dd Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Mon, 20 Feb 2012 11:50:47 -0500 Subject: [PATCH] Restore eap's misunderstanding of endianness. --- Sources/Plasma/Apps/plClient/winmain.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Sources/Plasma/Apps/plClient/winmain.cpp b/Sources/Plasma/Apps/plClient/winmain.cpp index 40b69d88..b4605fb7 100644 --- a/Sources/Plasma/Apps/plClient/winmain.cpp +++ b/Sources/Plasma/Apps/plClient/winmain.cpp @@ -989,8 +989,15 @@ static void SaveUserPass (LoginDialogParam *pLoginParam, char *password) if (StrLen(domain) == 0 || StrCmpI(domain, L"gametap") == 0) { plSHA1Checksum shasum(StrLen(password) * sizeof(password[0]), (uint8_t*)password); - - memcpy(pLoginParam->namePassHash, shasum.GetValue(), sizeof(ShaDigest)); + uint32_t* dest = reinterpret_cast(pLoginParam->namePassHash); + const uint32_t* from = reinterpret_cast(shasum.GetValue()); + + // I blame eap for this ass shit + dest[0] = hsToBE32(from[0]); + dest[1] = hsToBE32(from[1]); + dest[2] = hsToBE32(from[2]); + dest[3] = hsToBE32(from[3]); + dest[4] = hsToBE32(from[4]); } else {