From 7fba9321d182651e1b0fe61353889e68c66dc06f Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 3 Dec 2023 21:51:49 +0000 Subject: [PATCH] M_HandleProfileEdit: Tidy --- src/menus/options-profiles-edit-1.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/menus/options-profiles-edit-1.c b/src/menus/options-profiles-edit-1.c index 04ee24990..d81e82212 100644 --- a/src/menus/options-profiles-edit-1.c +++ b/src/menus/options-profiles-edit-1.c @@ -125,10 +125,10 @@ boolean M_ProfileEditInputs(INT32 ch) void M_HandleProfileEdit(void) { // Always copy the profile name and player name in the profile. - if (optionsmenu.profile) + if (optionsmenu.profile && !menutyping.active) { // Copy the first 6 chars for profile name - if (strlen(cv_dummyprofilename.string)) + if (cv_dummyprofilename.string[0]) { char *s; // convert dummyprofilename to uppercase @@ -141,8 +141,10 @@ void M_HandleProfileEdit(void) } } - if (strlen(cv_dummyprofileplayername.string)) + if (cv_dummyprofileplayername.string[0]) + { strncpy(optionsmenu.profile->playername, cv_dummyprofileplayername.string, MAXPLAYERNAME); + } } M_OptionsTick(); // Has to be afterwards because this can unset optionsmenu.profile