You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
passing members 127.0.0.1 43594 00010001 993f553cabfbd9b99900c2a798cfbe810b725bc213e347c51416df981d339572d189128f1704e66eb96273664f3cd622dee2675abf1289236eb5db9451233345as command line args doesnt work (mudclient.c line 5604).
CommandLineToArgvW is returning LPWSTR * so each char is 2 bytes.
Using wcscmp, sprintf_s and _wtoi to work with wide chars works: mud->options->members=wcscmp(argv[1], L"members")==0; sprintf_s(mud->server, sizeof(mud->server), "%ws",argv[2]); //convert wchar to char mud->port=_wtoi(argv[3]);
The text was updated successfully, but these errors were encountered:
passing
members 127.0.0.1 43594 00010001 993f553cabfbd9b99900c2a798cfbe810b725bc213e347c51416df981d339572d189128f1704e66eb96273664f3cd622dee2675abf1289236eb5db9451233345
as command line args doesnt work (mudclient.c line 5604).CommandLineToArgvW is returning LPWSTR * so each char is 2 bytes.
Using wcscmp, sprintf_s and _wtoi to work with wide chars works:
mud->options->members=wcscmp(argv[1], L"members")==0;
sprintf_s(mud->server, sizeof(mud->server), "%ws",argv[2]); //convert wchar to char
mud->port=_wtoi(argv[3]);
The text was updated successfully, but these errors were encountered: