diff options
| author | Ray <[email protected]> | 2020-11-01 19:42:50 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2020-11-01 19:42:50 +0100 |
| commit | 05ab39ed9f995fc5577fa72a0a5338eff2460cd8 (patch) | |
| tree | c0e667b1dcaf45e2ac62d192decdad02a95ab3ed | |
| parent | 5ac9cb04c2b8b401cea0fc61437bcb5300d02f91 (diff) | |
| download | raylib-05ab39ed9f995fc5577fa72a0a5338eff2460cd8.tar.gz raylib-05ab39ed9f995fc5577fa72a0a5338eff2460cd8.zip | |
REVIEWED: SaveFileText() error checking
| -rw-r--r-- | src/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c index 7b1d9ee4..05f6808b 100644 --- a/src/utils.c +++ b/src/utils.c @@ -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); |
