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

fix MultiByte <-> WideChar conversion return value on linux #6725

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jun 26, 2024

  1. fix MultiByte <-> WideChar conversion return value on linux

    MultiByteToWideChar/WideCharToMultiByte are supposed to include/exclude null termination
    based on whether the source string buffer is null terminated.
    
    This was done by comparing the input byte/wide character count to the output byte/wide
    character count excluding null termination. This only works correctly if the input only
    consists of ASCII characters. (ie. only characters that are single byte in UTF-8)
    
    This commit changes the code to explicitly check for a null terminator in the input
    and add one to the output size if the input was terminated.
    exoticorn committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    a0ba90a View commit details
    Browse the repository at this point in the history