-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add support for implicit marshalling of the eq types #644
Conversation
Also MSVC does not have support for strndup which is C23
``` const char arr[] = { 'A','B','C','D' }; ```
6fa8282
to
2055603
Compare
Cesium.Runtime/StringFunctions.cs
Outdated
var dest = new UTF8String((byte*)StdLibFunctions.Malloc(count)); | ||
src.CopyTo(dest, count); | ||
return dest; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this misses the null terminator. Please note this wording from the standard:
If the array pointed to by
s
does not contain a null within the first size
characters, a null is appended to the copy of the array.
Meaning the result should always be null-terminated, regardless of src[count]
being a null byte or not.
I have to say: I am quite confused about all this |
Re: |
Thanks! |
Also MSVC does not have support for strndup which is C23