Skip to content

Commit

Permalink
Fix fallback from {sc,dmd}1.conf to {sc,dmd}.conf
Browse files Browse the repository at this point in the history
When adding support for {sc,dmd1}.conf in b269a91, a bug prevented the
to really fallback to {sc,dmd}.conf. This commit fixes this.
  • Loading branch information
leandro-lucarella-sociomantic committed Dec 20, 2013
1 parent b9aa3fb commit 0401f8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/inifile.c
Expand Up @@ -156,7 +156,7 @@ const char *inifile(const char *argv0x, const char *inifilex, const char *envsec
File file(filename);

if (file.read())
return filename; // error reading file
return NULL; // error reading file

// Parse into lines
int eof = 0;
Expand Down
3 changes: 2 additions & 1 deletion src/mars.c
Expand Up @@ -540,7 +540,8 @@ int main(size_t argc, char *argv[])
is64bit = parse_arch(dflags_argc, dflags_argv, is64bit);
global.params.is64bit = is64bit;

inifile(argv[0], inifilename, is64bit ? "Environment64" : "Environment32");
if (inifilename != NULL)
inifile(argv[0], inifilename, is64bit ? "Environment64" : "Environment32");

getenv_setargv("DFLAGS", &argc, &argv);

Expand Down

0 comments on commit 0401f8d

Please sign in to comment.