sinbad / SPUD

Steve's Persistent Unreal Data library
MIT License
336 stars 51 forks source link

SaveComplete broadcast slot name is always empty #38

Closed cbQB closed 2 years ago

cbQB commented 2 years ago

void USpudSubsystem::SaveComplete(const FString& SlotName, bool bSuccess) { SlotNameInProgress = ""; TitleInProgress = FText(); ExtraInfoInProgress = nullptr; CurrentState = ESpudSystemState::RunningIdle; PostSaveGame.Broadcast(SlotName, bSuccess); } On successful completion, SlotName is a reference to SlotNameInProgress, which gets cleared by the first line. Suggested fix: CurrentState = ESpudSystemState::RunningIdle; PostSaveGame.Broadcast(SlotName, bSuccess); SlotNameInProgress = ""; TitleInProgress = FText(); ExtraInfoInProgress = nullptr;

sinbad commented 2 years ago

Thanks for reporting, this is now fixed.