fixed calculating maximum length of string values in setup menu
authorHolger Schemel <info@artsoft.org>
Tue, 2 Oct 2018 19:10:08 +0000 (21:10 +0200)
committerHolger Schemel <info@artsoft.org>
Tue, 2 Oct 2018 19:10:08 +0000 (21:10 +0200)
src/screens.c

index 127333bcb1408058c3793f57886a78bb8d4e75e7..758b3f67f1036cf977ecb6310784b9e365f3fa13 100644 (file)
@@ -6509,7 +6509,7 @@ static void drawSetupValue(int screen_pos, int setup_info_pos_raw)
   }
   else if (type & TYPE_STRING)
   {
-    int max_value_len = (SCR_FIELDX - 2) * 2;
+    int max_value_len = (SXSIZE - 2 * TILEX) / font_width_default;
 
     xpos = MENU_SCREEN_START_XPOS;