Skip to content

Commit

Permalink
libcommon: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Feb 22, 2014
1 parent 5dfee09 commit fe8f6c0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions doomsday/plugins/common/src/g_game.cpp
Expand Up @@ -2827,7 +2827,7 @@ struct savegamestateworker_params_t
};

/**
* Save the current game state to the specified saved slot.
* Save the current game state to the specified save slot.
*
* @return Non-zero iff the game state was saved successfully.
*/
Expand Down Expand Up @@ -2859,13 +2859,12 @@ static int saveGameStateWorker(void *context)
}

char const *userDescription = p.userDescription;

if(!userDescription || !userDescription[0])
{
SaveInfo &saveInfo = G_SaveSlots()[p.slotNumber].saveInfo();
if(!saveInfo.userDescription().isEmpty())
{
// Slot already in use; reuse the existing name.
// Slot already in use; reuse the existing description.
userDescription = Str_Text(AutoStr_FromTextStd(saveInfo.userDescription().toUtf8().constData()));
}
else if(gaSaveGameGenerateDescription)
Expand All @@ -2876,7 +2875,7 @@ static int saveGameStateWorker(void *context)

SaveInfo *saveInfo = SaveInfo::newWithCurrentSessionMetadata(
G_SaveSlots()[logicalSlot].fileName(),
p.userDescription);
userDescription);
try
{
App_Log(DE2_LOG_VERBOSE, "Attempting save game to \"%s\"",
Expand Down

0 comments on commit fe8f6c0

Please sign in to comment.