Skip to content
This repository has been archived by the owner on Mar 29, 2020. It is now read-only.

Commit

Permalink
Default output filename is again output.eu3
Browse files Browse the repository at this point in the history
  • Loading branch information
Idhrendur committed Aug 22, 2012
1 parent 2de1b2a commit b0df048
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Data Files/Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,5 @@ Revision Log Message
177 Don't bother mapping wastelands to wastelands
178 Map CK2 religions to CK2 religion groups
179 Map CK2 cultures to CK2 culture groups, then disallow wrong culture buildings
180 Use basetax and manpower proxies to try to break ties in religion conversion
180 Use basetax and manpower proxies to try to break ties in religion conversion
181 Default output filename is again output.eu3
10 changes: 9 additions & 1 deletion Source/Convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,15 @@ int main(int argc, char * argv[])
// Output results
printf("Outputting save.\n");
log("Outputting save.\n");
string outputFilename = inputFilename.substr(0, inputFilename.find_last_of('.')) + ".eu3";
string outputFilename;
if (argc >= 2)
{
outputFilename = inputFilename.substr(0, inputFilename.find_last_of('.')) + ".eu3";
}
else
{
outputFilename = "output.eu3";
}
FILE* output;
if (fopen_s(&output, outputFilename.c_str(), "w") != 0)
{
Expand Down

0 comments on commit b0df048

Please sign in to comment.