Commit Graph

220 Commits

Author SHA1 Message Date
Seweryn
3ea8b9298f Refactor text insertion logic in rtext.c (#6022)
Fixed nasty bug, text after insertion is deleted
2026-07-26 20:54:54 +02:00
Seweryn
14d3587858 Refactor text insertion logic in rtext.c (#6021)
Fixed nasty bug
2026-07-26 15:11:39 +02:00
GideonSerf
93e64f2210 Fix TextInsertAlloc overflow by correcting loop bounds (#5982)
Co-authored-by: gideons <gse@newspacesystems.com>
2026-07-16 12:08:41 +02:00
Thiago Mucci
b631fb3d05 Fix TextSubtext() returning empty string when position is 0 (#5975) 2026-07-13 15:11:42 +02:00
Ray
ebec978443 REVIEWED: TextJoin(), TextSubtext(), TextInsert*() - ROS: CLN-018 2026-07-11 16:45:56 +02:00
Ray
5992929e56 REVIEWED: Security: strncpy() replaced by snprintf() 2026-07-06 19:13:44 +02:00
Ray
77ecd5befc REVIEWED: TextToSnake(), not considering spaces properly 2026-07-02 10:46:38 +02:00
Brandon Arrendondo
9215540015 [rtext] Fix buffer overflow in TextReplaceBetween() (#5936)
The MAX_TEXT_BUFFER_LENGTH guard present in TextReplace()/TextInsert() was
missing here, so the three strncpy() calls could write past the 1024-byte
static buffer for long inputs. Add the same length check before copying.

Co-authored-by: Brandon Arrendondo <brandon.arrendondo@bissell.com>
2026-06-24 16:41:19 +02:00
Ray
87a6e9693c Format tweaks 2026-06-19 12:27:02 +02:00
Ray
f9c41a0866 Reemove trailing spaces 2026-06-16 21:12:12 +02:00
Ray
aebfd788c7 WARNING: BREAKING: REDESIGNED: ImageDraw() API, align with DrawTexture() 2026-06-07 21:53:07 +02:00
Ray
15d25242be REVIEWED: Comments to be more descriptive 2026-06-07 18:41:44 +02:00
Ray
2c690425c9 Reviewed comments, remove article usage 2026-06-03 21:02:59 +02:00
Ray
cef7718468 RENAMED: Some Rectangle parameters with more descriptive names 2026-06-03 20:16:12 +02:00
Thomas Anderson
fd28dc5644 [rtext] add warning for loadfontex/loadfontfrommemory (#5864)
* add warning for loadfontex/loadfontfrommemory

* bump to re-run build tests
2026-05-13 08:56:13 +02:00
Ray
72a341a37f Update rtext.c 2026-04-27 12:34:43 +02:00
Ray
06621eb3b7 REVIEWED: Comments for consistency and spelling 2026-04-27 11:34:58 +02:00
Ray
96e30549f5 Align default values on comments for config variables 2026-04-16 00:05:23 +02:00
Thomas Anderson
0decdcd497 update defines for new format etc (#5760) 2026-04-15 12:20:51 +02:00
Ray
da93ec4a21 Remove trailing spaces 2026-03-29 01:17:25 +01:00
Ray
8c44ea5032 Code gardening
REVIEWED: Some early returns, avoid if possible
REVIEWED: Some return variable names, for consistency, rename `success` to `result`
2026-03-29 00:37:01 +01:00
Ray
8a7aff509d WARNING: BREAKING: REDESIGNED: TextInsert(), TextReplace(), TextReplaceBetween(), using static buffers
Redesign has been conditioned by the usage of those functions on `rexm`, `rpc` and other tools; for many use cases a static buffer is enough and way more comfortable to use.
ADDED: `TextInsertAlloc()`, `TextReplaceAlloc()`, `TextReplaceBetweenAlloc()`, alternatives with internal allocations
2026-03-27 21:56:29 +01:00
Ray
0f0983c065 Remove trailing spaces 2026-03-25 16:51:02 +01:00
Ray
6ba6df3af3 Remove trailing spaces 2026-03-13 18:50:26 +01:00
Thomas Anderson
f9ea607385 fix error in textinsert, found by github user chrg127 (#5644) 2026-03-12 11:38:06 +01:00
Ray
99cab6d3a7 Update rtext.c 2026-03-06 17:11:48 +01:00
JoeStrout
c8d1f3e750 Make LoadFontFromImage limit its scanning to image dimensions. (#5626) 2026-03-06 16:52:58 +01:00
moe li
02b592cd7b [rtext] Add MeasureTextCodepoints() for direct measurement of codepoints (#5623)
* Measuring length of an array of codepoints

* Applied style changes and removed default measurement function
2026-03-05 11:49:57 +01:00
Ray
faf42366ec Code gardening 2026-03-04 01:14:26 +01:00
Ray
5ada84cc6d Update rtext.c 2026-03-04 00:13:47 +01:00
Ray
b4746469d4 Formating review, using imperative mode in comments 2026-03-03 22:40:34 +01:00
moe li
f583674327 fix memory corruption in GenImageFontAtlas reallocation (#5602) 2026-02-27 08:36:46 +01:00
Ray
5361265a7d WARNING: BREAKING: REDESIGNED: raylib build features config system #4411 #4554
Redesigned to support disabling features on compilation with `-DSUPPORT_FEATURE=0`
REMOVED: `SUPPORT_DEFAULT_FONT`, always supported
REMOVED: `SUPPORT_IMAGE_MANIPULATION `, always supported
REMOVED: `SUPPORT_TEXT_MANIPULATION`, always supported
REDESIGNED: `SUPPORT_FONT_ATLAS_WHITE_REC` to `FONT_ATLAS_CORNER_REC_SIZE`
REVIEWED: Config values (other than 0-1) are already defined on respective modules
Other config tweaks here and there
2026-02-26 08:19:28 +01:00
Ray
2454b3ed4b REVIEWED: TextReplace() and TextLength(), avoid using strcpy() 2026-02-20 16:27:08 +01:00
Ray
90dd9aef72 REVIEWED: GenImageFontAtlas(), no need for the conservative approach flag 2026-02-19 17:40:22 +01:00
Ray
97023def48 REVIEWED: GenImageFontAtlas(), scale image to fit all characters, in case it fails size estimation #5542 2026-02-17 18:45:14 +01:00
Ray
070082f8c9 REVIEWED: Comments to impersonal format 2026-02-12 18:55:40 +01:00
ssszcmawo
3568b6e293 [rtext] Fix and enhance TextReplace() function (#5511)
* add check for replacement,replace strcpy,strncpy with memcpy

* add 4 spaces in if statement

* add spaces
2026-01-26 12:04:22 +01:00
Ray
0df2fe981b REVIEWED: ExportFontAsCode() #5497 2026-01-15 10:42:58 +01:00
Ray
0c33c603f4 REVIEWED: EXTERNAL_CONFIG_FLAGS usage, check moved to config.h
Due to `utils` module removal, `EXTERNAL_CONFIG_FLAGS` was not working, so the system was redesigned.
This change is independent of #4411
2026-01-12 13:04:38 +01:00
Ray
dd7a1948f1 WARNING: REDESIGN: REMOVED: utils module, functionality moved to rcore module: logging and file-system #4551
[utils] was created long time ago, when [rcore] contained all the platforms code, the purpose of the file was exposing basic filesystem functionality across modules and also logging mechanism but many things have changed since then and there is no need to keep using this module.

 - Logging system has been move to [rcore] module and macros are exposed through `config.h` to other modules
 - File system functionality has also been centralized in [rcore] module that along the years it was already adding more and more file-system functions, now they are all in the same module
 - Android specific code has been moved to `rcore_android.c`, it had no sense to have specific platform code in `utils`, [rcore] is responsible of all platform code.
2026-01-10 12:13:07 +01:00
Ray
3678c2d157 REMOVE: TRACELOGD(), hardly ever used 2026-01-05 20:47:25 +01:00
Ray
416af51a93 Update year to 2026 2026-01-02 13:40:15 +01:00
Ray
c07d075a63 REVIEWED: Security checks formatting and comments 2026-01-01 16:54:44 +01:00
GlitchLens
5a3391fdce [rtext] Fix multiple security vulnerabilities in font loading (#5433, #5434, #5436) (#5450) 2026-01-01 16:35:12 +01:00
Ray
909f040dc5 Remove trailing spaces 2026-01-01 16:33:34 +01:00
Ray
95f72b162b REVIEWED: TextReplace(), revert breaking change, needs to be reviewed again... -WIP- 2025-12-31 22:50:17 +01:00
Ray
20dd4641c8 REVIEWED: Potential security concerns while copying unbounded text data between strings
Note that issue has been reported by CodeQL static analysis system
2025-12-24 19:35:06 +01:00
Kivi
ddb827fb6f Fixed LoadCodepoints declaring a new local variable shadowing codpoints (#5430) 2025-12-24 08:59:51 +01:00
Ray
e4baf682ab Update rtext.c 2025-12-22 20:30:11 +01:00