From 6bd23dac39d91f061722ad74dfd4c3faf760fa9a Mon Sep 17 00:00:00 2001 From: diafero Date: Mon, 1 Aug 2011 17:57:59 +0200 Subject: [PATCH 1/4] ignore pyc files (from the resource generator) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 813dc5ed..44dae2f7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ tags *.swp *.o *.orig +*.pyc Makefile CMakeCache.txt From b3e10ea95f58ef0c2d08c1d71322737cb2ded89e Mon Sep 17 00:00:00 2001 From: diafero Date: Mon, 1 Aug 2011 17:57:15 +0200 Subject: [PATCH 2/4] skip EULA if no TOS file exists --- Sources/Plasma/Apps/plClient/winmain.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/Plasma/Apps/plClient/winmain.cpp b/Sources/Plasma/Apps/plClient/winmain.cpp index 56dcbcdc..31774239 100644 --- a/Sources/Plasma/Apps/plClient/winmain.cpp +++ b/Sources/Plasma/Apps/plClient/winmain.cpp @@ -1008,6 +1008,8 @@ BOOL CALLBACK UruTOSDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l SetDlgItemText(hwndDlg, IDC_URULOGIN_EULATEXT, eulaData); delete [] eulaData; } + else // no TOS found, go ahead + EndDialog(hwndDlg, true); break; } From e2603ef9dabbcfff00a5f76d175e4f6a8a667bd3 Mon Sep 17 00:00:00 2001 From: diafero Date: Mon, 1 Aug 2011 18:35:39 +0200 Subject: [PATCH 3/4] remove unused parameter (how old is that code??) --- Sources/Plasma/Apps/plClient/winmain.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Sources/Plasma/Apps/plClient/winmain.cpp b/Sources/Plasma/Apps/plClient/winmain.cpp index 31774239..46335029 100644 --- a/Sources/Plasma/Apps/plClient/winmain.cpp +++ b/Sources/Plasma/Apps/plClient/winmain.cpp @@ -86,7 +86,6 @@ extern hsBool gUseBackgroundDownloader; enum { - kArgToDni, kArgSkipLoginDialog, kArgServerIni, kArgLocalData, @@ -94,7 +93,6 @@ enum }; static const CmdArgDef s_cmdLineArgs[] = { - { kCmdArgFlagged | kCmdTypeBool, L"ToDni", kArgToDni }, { kCmdArgFlagged | kCmdTypeBool, L"SkipLoginDialog", kArgSkipLoginDialog }, { kCmdArgFlagged | kCmdTypeString, L"ServerIni", kArgServerIni }, { kCmdArgFlagged | kCmdTypeBool, L"LocalData", kArgLocalData }, From 4563df7f201cbf716fa6f6bf088662fe3598ac96 Mon Sep 17 00:00:00 2001 From: diafero Date: Mon, 1 Aug 2011 23:19:00 +0200 Subject: [PATCH 4/4] fix UruLauncher crash when the Launcher manifest is empty --- Sources/Plasma/Apps/plUruLauncher/SelfPatcher.cpp | 7 +++++++ .../Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Sources/Plasma/Apps/plUruLauncher/SelfPatcher.cpp b/Sources/Plasma/Apps/plUruLauncher/SelfPatcher.cpp index 2c465a7a..98832e1a 100644 --- a/Sources/Plasma/Apps/plUruLauncher/SelfPatcher.cpp +++ b/Sources/Plasma/Apps/plUruLauncher/SelfPatcher.cpp @@ -153,6 +153,13 @@ static void ManifestCallback ( return; } +#ifndef PLASMA_EXTERNAL_RELEASE + if (entryCount == 0) { // dataserver does not contain a patcher + s_downloadComplete = true; + return; + } +#endif + char ansi[MAX_PATH]; // MD5 check current patcher against value in manifest diff --git a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp index a17d4d50..453c7940 100644 --- a/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp +++ b/Sources/Plasma/PubUtilLib/plNetGameLib/Private/plNglFile.cpp @@ -944,7 +944,7 @@ bool ManifestRequestTrans::Recv ( dword numFiles = reply.numFiles; dword wcharCount = reply.wcharCount; - const wchar* curChar = reply.manifestData; + const wchar* curChar = reply.manifestData; // the pointer is not yet dereferenced here! // tell the server we got the data Cli2File_ManifestEntryAck manifestAck; @@ -955,9 +955,9 @@ bool ManifestRequestTrans::Recv ( m_conn->Send(&manifestAck, manifestAck.messageBytes); - // if wcharCount is 2, the data only contains the terminator "\0\0" and we + // if wcharCount is 2 or less, the data only contains the terminator "\0\0" and we // don't need to convert anything (and we are done) - if ((IS_NET_ERROR(reply.result)) || (wcharCount == 2)) { + if ((IS_NET_ERROR(reply.result)) || (wcharCount <= 2)) { // we have a problem... or we have nothing to so, so we're done m_result = reply.result; m_state = kTransStateComplete;