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

[rtext] Fix GetCodepointNext() to return default value on invalid input with size=0 #2997

Merged
merged 4 commits into from
Apr 6, 2023

Commits on Apr 1, 2023

  1. Fix GetCodepointNext to return default value with size=0 on invalid i…

    …nput. Modify LoadCodepoints to work when GetCodepointNext returns a size of 0. All internal use of GetCodepointNext and GetCodepointPrev checked. This fix may break external code dealing with invalid input as the old code erroneously never returned a size of 0, external code that doesn't properly check for size=0 may endlessly loop or overflow a buffer on invalid input.
    anon committed Apr 1, 2023
    Configuration menu
    Copy the full SHA
    fb89eac View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2023

  1. Change default behaviour of GetCodepointNext to return a size of 1 in…

    …stead of 0. This matches existing prod behaviour and guarantees size 1..4 is returned. Simplify internal code that uses GetCodepointNext that previously had to account for size=0.
    anon committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    ed02fbd View commit details
    Browse the repository at this point in the history
  2. Simplified progressing through a UTF-8 string in ImageTextEx and Meas…

    …ureTextEx. This change matches existing precedent in DrawTextEx
    anon committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    41e9eda View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    101d305 View commit details
    Browse the repository at this point in the history