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

eastl::string is not correct if it includes 23 characters #566

Open
chengkechi-google opened this issue Mar 5, 2025 · 2 comments
Open

Comments

@chengkechi-google
Copy link

I am using eastl::string as a file name, but I found out there is an issue if the string includes 23 characters. I am using VS 2022.

This is my test code:
eastl::string name = "12345678901234567890123";

The result is :
name = "12345678901234567890123..."

I think it is because of small string optimization, but I am unsure. Is this the expected result?
Thanks!

@Reneg973
Copy link

Reneg973 commented Mar 8, 2025

How do you get that result? string is not null terminated, so any view on this may show bytes behind the "real" data.

@chengkechi-google
Copy link
Author

How do you get that result? string is not null terminated, so any view on this may show bytes behind the "real" data.

I only assigned a string with 23 characters, then I got this result. Strings with other lengths are no problem.

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

2 participants