diff options
author | glx <glx@openttd.org> | 2011-03-04 22:34:10 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2011-03-04 22:34:10 +0000 |
commit | 7f54c59a66ddec3fa1bb6b730f580b6189adcdc8 (patch) | |
tree | 035812b6ca312cf338da41fafbf95aa5e14dccf7 /src/settingsgen | |
parent | 150b5c0bf75074b6e7aa508346839036ea234620 (diff) | |
download | openttd-7f54c59a66ddec3fa1bb6b730f580b6189adcdc8.tar.xz |
(svn r22188) -Add: Generate the settings as part of the MSVC build process, and enable it in Makefile too
Diffstat (limited to 'src/settingsgen')
-rw-r--r-- | src/settingsgen/settingsgen.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/settingsgen/settingsgen.cpp b/src/settingsgen/settingsgen.cpp index f5a087f21..16300292a 100644 --- a/src/settingsgen/settingsgen.cpp +++ b/src/settingsgen/settingsgen.cpp @@ -448,6 +448,10 @@ int CDECL main(int argc, char *argv[]) CopyFile(after_file, stdout); } else { FILE *fp = fopen(output_file, "w"); + if (fp == NULL) { + fprintf(stderr, "settingsgen: Warning: Cannot open file %s\n", output_file); + return 1; + } CopyFile(before_file, fp); _stored_output.Write(fp); CopyFile(after_file, fp); |