projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20070318-1-src
[rocksndiamonds.git]
/
src
/
libgame
/
setup.c
diff --git
a/src/libgame/setup.c
b/src/libgame/setup.c
index bc8a1a34740bb1b31ab92b928dfba63cffa8b8b4..373ffe33b22920782ac4b4e9ce4a2ceac1813c9c 100644
(file)
--- a/
src/libgame/setup.c
+++ b/
src/libgame/setup.c
@@
-1773,8
+1773,7
@@
static boolean loadSetupFileData(void *setup_file_data, char *filename,
void *insert_ptr = NULL;
boolean read_continued_line = FALSE;
FILE *file;
void *insert_ptr = NULL;
boolean read_continued_line = FALSE;
FILE *file;
- int line_nr = 0;
- int token_count = 0;
+ int line_nr = 0, token_count = 0, include_count = 0;
#if CHECK_TOKEN_VALUE_SEPARATOR__WARN_IF_MISSING
token_value_separator_warning = FALSE;
#if CHECK_TOKEN_VALUE_SEPARATOR__WARN_IF_MISSING
token_value_separator_warning = FALSE;
@@
-1873,6
+1872,8
@@
static boolean loadSetupFileData(void *setup_file_data, char *filename,
free(basepath);
free(basename);
free(filename_include);
free(basepath);
free(basename);
free(filename_include);
+
+ include_count++;
}
else
{
}
else
{
@@
-1928,7
+1929,7
@@
static boolean loadSetupFileData(void *setup_file_data, char *filename,
Error(ERR_INFO_LINE, "-");
#endif
Error(ERR_INFO_LINE, "-");
#endif
- if (token_count == 0)
+ if (token_count == 0
&& include_count == 0
)
Error(ERR_WARN, "configuration file '%s' is empty", filename);
if (top_recursion_level)
Error(ERR_WARN, "configuration file '%s' is empty", filename);
if (top_recursion_level)