From 3083f0cd439394635dac26f76a6917d50e56b738 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 11 May 2025 11:03:49 +0200 Subject: [PATCH] REVIEWED: `SaveFileText()`, const input text --- src/raylib.h | 2 +- src/utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/raylib.h b/src/raylib.h index fc949a02d..d7de006f8 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1123,7 +1123,7 @@ RLAPI bool SaveFileData(const char *fileName, void *data, int dataSize); // Save RLAPI bool ExportDataAsCode(const unsigned char *data, int dataSize, const char *fileName); // Export data to code (.h), returns true on success RLAPI char *LoadFileText(const char *fileName); // Load text data from file (read), returns a '\0' terminated string RLAPI void UnloadFileText(char *text); // Unload file text data allocated by LoadFileText() -RLAPI bool SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success +RLAPI bool SaveFileText(const char *fileName, const char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success //------------------------------------------------------------------ // File system functions diff --git a/src/utils.c b/src/utils.c index 5c189845b..26e7a1bab 100644 --- a/src/utils.c +++ b/src/utils.c @@ -405,7 +405,7 @@ void UnloadFileText(char *text) } // Save text data to file (write), string must be '\0' terminated -bool SaveFileText(const char *fileName, char *text) +bool SaveFileText(const char *fileName, const char *text) { bool success = false;