mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-08 04:18:15 +00:00
REVIEWED: SaveFileText() error checking
This commit is contained in:
@@ -280,7 +280,7 @@ void SaveFileText(const char *fileName, char *text)
|
||||
{
|
||||
int count = fprintf(file, "%s", text);
|
||||
|
||||
if (count == 0) TRACELOG(LOG_WARNING, "FILEIO: [%s] Failed to write text file", fileName);
|
||||
if (count < 0) TRACELOG(LOG_WARNING, "FILEIO: [%s] Failed to write text file", fileName);
|
||||
else TRACELOG(LOG_INFO, "FILEIO: [%s] Text file saved successfully", fileName);
|
||||
|
||||
fclose(file);
|
||||
|
Reference in New Issue
Block a user