Skip to content

Commit

Permalink
Fixed issue with raw key loading
Browse files Browse the repository at this point in the history
  • Loading branch information
noah- committed Jun 25, 2017
1 parent 02b9dde commit 160f7ca
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 56 deletions.
55 changes: 55 additions & 0 deletions D2BS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,61 @@ BOOL WINAPI DllMain(HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved)
Vars.bMulti = TRUE;
}

command = GetCommand("-c0");

if(command)
{
Vars.bUseRawCDKey = 1;
const char *keys = (char*)command->szText;
int len = strlen(keys);
strncat_s(Vars.szClassic, keys, len);
}

command = GetCommand("-c1");

if(command)
{
const char *keys = (char*)command->szText;
int len = strlen(keys);
strncat_s(Vars.szClassic, keys, len);
}

command = GetCommand("-c2");

if(command)
{
const char *keys = (char*)command->szText;
int len = strlen(keys);
strncat_s(Vars.szClassic, keys, len);
}

command = GetCommand("-e0");

if(command)
{
const char *keys = (char*)command->szText;
int len = strlen(keys);
strncat_s(Vars.szLod, keys, len);
}

command = GetCommand("-e1");

if(command)
{
const char *keys = (char*)command->szText;
int len = strlen(keys);
strncat_s(Vars.szLod, keys, len);
}

command = GetCommand("-e2");

if(command)
{
const char *keys = (char*)command->szText;
int len = strlen(keys);
strncat_s(Vars.szLod, keys, len);
}

#if 0
char errlog[516] = "";
sprintf_s(errlog, 516, "%sd2bs.log", Vars.szPath);
Expand Down
2 changes: 1 addition & 1 deletion D2BS.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#define XP_WIN

#define D2BS_VERSION "1.5.1863" //uptodate with d branch 1765 ff 20b
#define D2BS_VERSION "1.5.1864" //uptodate with d branch 1765 ff 20b

#include <windows.h>
#include <vector>
Expand Down
55 changes: 0 additions & 55 deletions D2Handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,61 +42,6 @@ DWORD WINAPI D2Thread(LPVOID lpParam)

ParseCommandLine(GetCommandLineA());

command = GetCommand("-c0");

if(command)
{
Vars.bUseRawCDKey = 1;
const char *keys = (char*)command->szText;
int len = strlen(keys);
strncat_s(Vars.szClassic, keys, len);
}

command = GetCommand("-c1");

if(command)
{
const char *keys = (char*)command->szText;
int len = strlen(keys);
strncat_s(Vars.szClassic, keys, len);
}

command = GetCommand("-c2");

if(command)
{
const char *keys = (char*)command->szText;
int len = strlen(keys);
strncat_s(Vars.szClassic, keys, len);
}

command = GetCommand("-e0");

if(command)
{
const char *keys = (char*)command->szText;
int len = strlen(keys);
strncat_s(Vars.szLod, keys, len);
}

command = GetCommand("-e1");

if(command)
{
const char *keys = (char*)command->szText;
int len = strlen(keys);
strncat_s(Vars.szLod, keys, len);
}

command = GetCommand("-e2");

if(command)
{
const char *keys = (char*)command->szText;
int len = strlen(keys);
strncat_s(Vars.szLod, keys, len);
}

command = GetCommand("-handle");

if(command)
Expand Down

0 comments on commit 160f7ca

Please sign in to comment.