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

String::create(wchar_t* ...) is broken on non Windows systems #1077

Open
tobil4sk opened this issue Dec 20, 2023 · 0 comments
Open

String::create(wchar_t* ...) is broken on non Windows systems #1077

tobil4sk opened this issue Dec 20, 2023 · 0 comments

Comments

@tobil4sk
Copy link
Member

The wchar_t overload for String::create() assumes that wchar_t has a size of two bytes, which is only the case on Windows. On other systems it creates an invalid string if a valid wchar_t* is passed in.

https://github.com/HaxeFoundation/hxcpp/blob/master/src/String.cpp#L465-L519

String::create(wchar_t* ...) should be fixed to work properly on all systems. It might also be useful to have a alloc_string16 function to accompany alloc_string and alloc_wstring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant