Przeglądaj źródła

REVIEWED: `SaveFileText()`, const input text

pull/4937/head
Ray 3 tygodni temu
rodzic
commit
3083f0cd43
2 zmienionych plików z 2 dodań i 2 usunięć
  1. +1
    -1
      src/raylib.h
  2. +1
    -1
      src/utils.c

+ 1
- 1
src/raylib.h Wyświetl plik

@ -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 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 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 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 // File system functions

+ 1
- 1
src/utils.c Wyświetl plik

@ -405,7 +405,7 @@ void UnloadFileText(char *text)
} }
// Save text data to file (write), string must be '\0' terminated // 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; bool success = false;

Ładowanie…
Anuluj
Zapisz