Files
raylib/src
chocolate42 8367abad1a [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>
2023-04-06 12:34:37 +02:00
..
2023-03-22 20:11:03 +01:00
2023-03-22 12:43:18 +01:00
2023-03-15 17:51:23 +01:00
2023-01-01 16:07:51 +01:00
2018-09-26 16:02:42 +02:00
2023-01-01 16:07:51 +01:00
2023-03-14 13:06:17 +01:00
2023-03-20 16:43:22 +01:00
2023-01-01 16:07:51 +01:00