From e227371265280ea8bcf137b4512aa4f113d61dc1 Mon Sep 17 00:00:00 2001 From: Ray Date: Sat, 11 Jan 2025 23:38:21 +0100 Subject: [PATCH] REVIEWED: `TextJoin()`, convert `const char **` to `char**` It generates multiple issues: https://c-faq.com/ansi/constmismatch.html --- src/raylib.h | 2 +- src/rtext.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/raylib.h b/src/raylib.h index f59e1c04..27a8ab04 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1510,7 +1510,7 @@ RLAPI const char *TextFormat(const char *text, ...); RLAPI const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string RLAPI char *TextReplace(const char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!) RLAPI char *TextInsert(const char *text, const char *insert, int position); // Insert text in a position (WARNING: memory must be freed!) -RLAPI char *TextJoin(const char **textList, int count, const char *delimiter); // Join text strings with delimiter +RLAPI char *TextJoin(char **textList, int count, const char *delimiter); // Join text strings with delimiter RLAPI char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings RLAPI void TextAppend(char *text, const char *append, int *position); // Append text at specific position and move cursor! RLAPI int TextFindIndex(const char *text, const char *find); // Find first text occurrence within a string diff --git a/src/rtext.c b/src/rtext.c index b93fa1c3..d8d29005 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -1629,7 +1629,7 @@ char *TextInsert(const char *text, const char *insert, int position) // Join text strings with delimiter // REQUIRES: memset(), memcpy() -char *TextJoin(const char **textList, int count, const char *delimiter) +char *TextJoin(char **textList, int count, const char *delimiter) { static char buffer[MAX_TEXT_BUFFER_LENGTH] = { 0 }; memset(buffer, 0, MAX_TEXT_BUFFER_LENGTH);