From 36cd208b408881718b078317324b672da0a782f9 Mon Sep 17 00:00:00 2001 From: Sveinung Kvilhaugsvik Date: Tue, 23 Feb 2021 00:01:13 +0100 Subject: [PATCH] Ruledit: don't success exit on missing comments. The program refuses to start when no comments-x.y.txt file is found. Exit with EXIT_FAILURE to signal that something is wrong. See osdn #41635 --- tools/ruledit/ruledit.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/ruledit/ruledit.cpp b/tools/ruledit/ruledit.cpp index a125ad7a5d..586e783138 100644 --- a/tools/ruledit/ruledit.cpp +++ b/tools/ruledit/ruledit.cpp @@ -64,6 +64,7 @@ int main(int argc, char **argv) { enum log_level loglevel = LOG_NORMAL; int ui_options; + int exit_status = EXIT_SUCCESS; /* Load win32 post-crash debugger */ #ifdef FREECIV_MSWINDOWS @@ -118,6 +119,8 @@ int main(int argc, char **argv) /* TRANS: 'Failed to load comments-x.y.txt' where x.y is * freeciv version */ log_error(R__("Failed to load %s."), COMMENTS_FILE_NAME); + + exit_status = EXIT_FAILURE; } } @@ -129,7 +132,7 @@ int main(int argc, char **argv) /* Clean up command line arguments. */ cmdline_option_values_free(); - return EXIT_SUCCESS; + return exit_status; } /**********************************************************************//** -- 2.20.1