Merge pull request #191 from hesiod/patch-1

Fix null pointer dereference
This commit is contained in:
Hans-Kristian Arntzen 2017-05-30 21:57:48 +02:00 committed by GitHub
commit d93fcbdd9b

View File

@ -192,7 +192,7 @@ static bool write_string_to_file(const char *path, const char *string)
FILE *file = fopen(path, "w"); FILE *file = fopen(path, "w");
if (!file) if (!file)
{ {
fprintf(file, "Failed to write file: %s\n", path); fprintf(stderr, "Failed to write file: %s\n", path);
return false; return false;
} }