From 4508fea6e0496b3ee1f6a322f7e20ad853e2aa4e Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 30 Oct 2022 21:57:52 -0500 Subject: [PATCH] GUI: fix feeling lucky not changing system name --- src/gui/newSong.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/newSong.cpp b/src/gui/newSong.cpp index eff8d4a0..7959149b 100644 --- a/src/gui/newSong.cpp +++ b/src/gui/newSong.cpp @@ -128,7 +128,9 @@ void FurnaceGUI::drawNewSong() { if (newSystemCat->systems.size()==0) { ImGui::CloseCurrentPopup(); } else { - nextDesc=newSystemCat->systems[rand()%newSystemCat->systems.size()].definition.data(); + unsigned int selection=rand()%newSystemCat->systems.size(); + nextDesc=newSystemCat->systems[selection].definition.data(); + nextDescName=newSystemCat->systems[selection].name; accepted=true; } }