fixed redrawing previous player name when aborting typing player name
authorHolger Schemel <info@artsoft.org>
Tue, 27 Oct 2020 23:26:10 +0000 (00:26 +0100)
committerHolger Schemel <info@artsoft.org>
Sun, 13 Dec 2020 23:58:00 +0000 (00:58 +0100)
src/screens.c

index c37ca97933325565571fa739398b4c2321ff836a..4e41573bc7411db3c1633abba84063b132447aee 100644 (file)
@@ -4110,12 +4110,12 @@ static void setTypeNameValues(char *name, struct TextPosInfo *pos,
   if (strEqual(name, ""))
     strcpy(name, EMPTY_PLAYER_NAME);
 
+  setTypeNameValues_Name(name, pos);
+
   // if player name not changed, no further action required
   if (strEqual(name, type_name_last))
     return;
 
-  setTypeNameValues_Name(name, pos);
-
   // redraw player name before (possibly) opening request dialogs
   drawTypeNameText(name, pos, FALSE);