summaryrefslogtreecommitdiffhomepage
path: root/StarsEx/CampaignSaveGame.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-04-05 23:23:09 +0200
committerAki <please@ignore.pl>2022-04-05 23:23:09 +0200
commit7552ac635c39baae28de9b7c75cdc23d3547168e (patch)
tree5276ff936da8979859c2d2db93d90e91a3d4ff83 /StarsEx/CampaignSaveGame.cpp
parent3b004ab63c16f2eb783e29a35131450ba28383a3 (diff)
downloadstarshatter-7552ac635c39baae28de9b7c75cdc23d3547168e.zip
starshatter-7552ac635c39baae28de9b7c75cdc23d3547168e.tar.gz
starshatter-7552ac635c39baae28de9b7c75cdc23d3547168e.tar.bz2
Fixed campaign saving
Formatting was bad and resulted in crashes or malformed save files. Avoiding c-style cast is just an addition.
Diffstat (limited to 'StarsEx/CampaignSaveGame.cpp')
-rw-r--r--StarsEx/CampaignSaveGame.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/StarsEx/CampaignSaveGame.cpp b/StarsEx/CampaignSaveGame.cpp
index f4b16ce..b225612 100644
--- a/StarsEx/CampaignSaveGame.cpp
+++ b/StarsEx/CampaignSaveGame.cpp
@@ -582,8 +582,8 @@ CampaignSaveGame::Save(const char* name)
fprintf(f, "unit: \"%s\"\n", player_unit->Name().data());
fprintf(f, "status: %d\n", (int) campaign->GetStatus());
- fprintf(f, "basetime: %f\n", campaign->GetStartTime());
- fprintf(f, "time: %f // %s\n\n",
+ fprintf(f, "basetime: %Lf\n", campaign->GetStartTime());
+ fprintf(f, "time: %Lf // %s\n\n",
campaign->GetTime(),
timestr);