raylib/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
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
..
external Update rl_gputex.h 2023-03-22 20:11:03 +01:00
build.zig zig build: do not use deprecated functions (#2913) 2023-02-06 10:28:24 +01:00
CMakeLists.txt Update CMakeLists.txt 2023-03-22 12:43:18 +01:00
config.h Update config.h 2023-03-15 17:51:23 +01:00
Makefile Update Makefile comment to indicate arm64 as a supported Linux desktop platform (#2965) 2023-03-18 17:37:04 +01:00
minshell.html Fixed some grammar mistakes and typos. (#2914) 2023-02-09 13:17:47 +01:00
raudio.c Add const qualifier to char * path argument in qoaplay_open() (#2972) 2023-03-19 20:34:22 +01:00
raylib.dll.rc Update year to 2023 2023-01-01 16:07:51 +01:00
raylib.dll.rc.data Update resource arch for 64bit #2978 2023-03-22 11:15:00 +01:00
raylib.h Updated version to avoid confusion with 4.5 release 2023-03-20 18:03:37 +01:00
raylib.ico Updated icon data 2018-09-26 16:02:42 +02:00
raylib.rc Update year to 2023 2023-01-01 16:07:51 +01:00
raylib.rc.data Update resource arch for 64bit #2978 2023-03-22 11:15:00 +01:00
raymath.h slightly optimize Vector3Normalize (#2982) 2023-03-22 11:01:05 +01:00
rcamera.h REVIEWED: UpdateCameraPro() to use Vector3 2023-03-12 19:40:43 +01:00
rcore.c Minor tweaks to raylib events automation system 2023-03-22 19:47:42 +01:00
rgestures.h Fixed some grammar mistakes and typos. (#2914) 2023-02-09 13:17:47 +01:00
rglfw.c Fix missing symbol when rglfw.c on BSD platforms (#2968) 2023-03-19 09:43:51 +01:00
rlgl.h Update rlgl.h 2023-03-14 13:06:17 +01:00
rmodels.c Fix typo in rmodels.c (#2976) 2023-03-20 16:43:22 +01:00
rshapes.c Fixed some grammar mistakes and typos. (#2914) 2023-02-09 13:17:47 +01:00
rtext.c [rtext] Fix GetCodepointNext() to return default value on invalid input with size=0 (#2997) 2023-04-06 12:34:37 +02:00
rtextures.c [rtext] Fix GetCodepointNext() to return default value on invalid input with size=0 (#2997) 2023-04-06 12:34:37 +02:00
shell.html Fixed some grammar mistakes and typos. (#2914) 2023-02-09 13:17:47 +01:00
utils.c REVIEWED: TraceLog(), avoid possible buffer overflow 2023-03-15 13:03:55 +01:00
utils.h Update year to 2023 2023-01-01 16:07:51 +01:00