summaryrefslogtreecommitdiffhomepage
path: root/parser
diff options
context:
space:
mode:
authorchocolate42 <[email protected]>2023-04-06 11:34:37 +0100
committerGitHub <[email protected]>2023-04-06 12:34:37 +0200
commit8367abad1a925fc7cf60fd8e71b5f6dbf6250ddb (patch)
tree5fc176a58895f00f1e832b7fe901f732025dad18 /parser
parent17c443ee6db0a111d111e766bb517657204c3574 (diff)
downloadraylib-8367abad1a925fc7cf60fd8e71b5f6dbf6250ddb.tar.gz
raylib-8367abad1a925fc7cf60fd8e71b5f6dbf6250ddb.zip
[rtext] Fix GetCodepointNext() to return default value on invalid input with size=0 (#2997)
* Fix GetCodepointNext to return default value with size=0 on invalid input. 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. * Change default behaviour of GetCodepointNext to return a size of 1 instead 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. * Simplified progressing through a UTF-8 string in ImageTextEx and MeasureTextEx. This change matches existing precedent in DrawTextEx * GetCodepointNext: Add 10xxxxxx checks to multibyte encodings. --------- Co-authored-by: anon <anon>
Diffstat (limited to 'parser')
0 files changed, 0 insertions, 0 deletions