Skip to content

Conversation

@elwl
Copy link

@elwl elwl commented Jul 16, 2015

Updated the README with instructions to building on OS X.

WzToNx:
Use standard C++ locale.
No longer dies when a string is too long, instead replacing the string
with a message telling the user the string is garbage.

Updated the README with instructions to building on OS X.

WzToNx:
Use standard C++ locale.
No longer dies when a string is too long, instead replacing the string
with a message telling the user the string is garbage.
@retep998
Copy link
Member

PR probably needs to be updated in light of e2453f4

Copilot AI added a commit to ErwinsExpertise/NoLifeStory that referenced this pull request Nov 8, 2025
The issue was platform-specific due to incorrect handling of string conversions and length limits. Applied the comprehensive fix from the original NoLifeDev repository:

1. Changed limit from 0x1ffff to std::numeric_limits<uint16_t>::max() (65535)
2. Return placeholder string instead of throwing exception (graceful degradation)
3. Fixed convert_str() to use correct char16_t conversion instead of wchar_t
4. Added length check in add_string() to prevent downstream issues
5. Changed locale include from <locale> to <clocale> for standard C++ locale
6. Moved length checks to occur after skip() to properly advance file position

This matches the fix proven to work on macOS/Linux in the original repository.

Co-authored-by: ErwinsExpertise <44278151+ErwinsExpertise@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants