Skip to content
New issue

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

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

Already on GitHub? # to your account

Issue with fstring Function Not Correctly Handling Certain String Formats #32

Open
chendongde310 opened this issue Feb 28, 2024 · 1 comment
Assignees

Comments

@chendongde310
Copy link

Hello [Author/Developer Team],

I've encountered an issue with the fstring function in the ReaderUasset prototype, where it seems to incorrectly handle or interpret certain string formats, particularly strings containing underscores followed by numbers. For example, a string like M_dviz_Plants_a_x_2 is unexpectedly read as M_dviz_Plants_a_x, omitting the trailing digit.

Expected Behavior:
The expected behavior is for the fstring function to accurately read and return the full string as it appears in the data, including any numbers or special characters following an underscore.

Actual Behavior:
When reading strings formatted with an underscore followed by numbers, the numbers are ignored, and the string is truncated at the underscore. This behavior is consistent across multiple tests and seems unrelated to the specific data set.

Possible Issues:
Upon reviewing the provided fstring function code, there doesn't seem to be explicit logic that would cause this behavior. The issue might stem from how the string lengths are calculated or how bytes are read and interpreted in the presence of special characters.

Suggested Next Steps:
I am unsure if this behavior is intended or if it's a bug. It would be greatly appreciated if you could provide some insight into this issue, and whether there's a workaround or fix that I can apply.

Thank you for your time and assistance. Looking forward to your response.

@rancoud
Copy link
Member

rancoud commented May 5, 2024

Hello, do you have an uasset with that problem as an example to share here?
Maybe I can find a pattern on how/why it failed.

@rancoud rancoud self-assigned this May 5, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants