diff options
| author | Ray <[email protected]> | 2019-07-22 21:29:50 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2019-07-22 21:29:50 +0200 |
| commit | 632d064b21b6c3f2d092f016d1380b625184966a (patch) | |
| tree | e5a56006063d777a0dfd33a80f1236aa638ec5a3 /src/text.c | |
| parent | bc3983a3dd48fc72f84ecb19e2f3bc50423c777a (diff) | |
| download | raylib-632d064b21b6c3f2d092f016d1380b625184966a.tar.gz raylib-632d064b21b6c3f2d092f016d1380b625184966a.zip | |
Review text functions return value
It needs to be freed
Diffstat (limited to 'src/text.c')
| -rw-r--r-- | src/text.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1215,7 +1215,7 @@ const char *TextSubtext(const char *text, int position, int length) // Replace text string // REQUIRES: strlen(), strstr(), strncpy(), strcpy() // WARNING: Internally allocated memory must be freed by the user (if return != NULL) -const char *TextReplace(char *text, const char *replace, const char *by) +char *TextReplace(char *text, const char *replace, const char *by) { char *result; @@ -1266,7 +1266,7 @@ const char *TextReplace(char *text, const char *replace, const char *by) // Insert text in a specific position, moves all text forward // REQUIRES: strlen(), strcpy(), strtok() // WARNING: Allocated memory should be manually freed -const char *TextInsert(const char *text, const char *insert, int position) +char *TextInsert(const char *text, const char *insert, int position) { int textLen = strlen(text); int insertLen = strlen(insert); |
