fix: Ghost run as windows service failed

This commit is contained in:
shaun
2025-12-08 14:04:09 +01:00
committed by yuanyuanxiang
parent 4b3818fa48
commit 47d30e7b9b
2 changed files with 52 additions and 52 deletions

View File

@@ -1,4 +1,4 @@
// ClientDll.cpp : Defines the entry point for the DLL application.
// ClientDll.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
@@ -217,7 +217,7 @@ int main(int argc, const char *argv[])
}
SetConsoleCtrlHandler(&callback, TRUE);
const char* ip = argc > 1 ? argv[1] : NULL;
const char* ip = (argc > 1 && argv[1][0] != '-') ? argv[1] : NULL;
int port = argc > 2 ? atoi(argv[2]) : 6543;
ClientApp& app(g_MyApp);
app.g_Connection->SetType(CLIENT_TYPE_ONE);