Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command line arguments to set up world (without world list) #220

Open
let-mein opened this issue Sep 15, 2024 · 0 comments
Open

command line arguments to set up world (without world list) #220

let-mein opened this issue Sep 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@let-mein
Copy link

let-mein commented Sep 15, 2024

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]);

@misterhat misterhat added the bug Something isn't working label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants