diff options
Diffstat (limited to 'src/common/cfgfiles.c')
-rw-r--r-- | src/common/cfgfiles.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 725b9632..7d0e9c91 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -41,7 +41,7 @@ #define DEF_FONT "Monospace 9" #define DEF_FONT_ALTER "Arial Unicode MS,Lucida Sans Unicode,MS Gothic,Unifont" -const char const *languages[LANGUAGES_LENGTH] = { +const char * const languages[LANGUAGES_LENGTH] = { "af", "sq", "am", "ast", "az", "eu", "be", "bg", "ca", "zh_CN", /* 0 .. 9 */ "zh_TW", "cs", "da", "nl", "en_GB", "en", "et", "fi", "fr", "gl", /* 10 .. 19 */ "de", "el", "gu", "hi", "hu", "id", "it", "ja", "kn", "rw", /* 20 .. 29 */ @@ -630,7 +630,7 @@ convert_with_fallback (const char *str, const char *fallback) } static int -find_language_number (const char const *lang) +find_language_number (const char * const lang) { int i; @@ -1085,12 +1085,10 @@ set_showval (session *sess, const struct prefs *var, char *tbuf) len = strlen (var->name); memcpy (tbuf, var->name, len); - dots = 29 - len; - - if (dots < 0) - { + if (len > 29) dots = 0; - } + else + dots = 29 - len; tbuf[len++] = '\003'; tbuf[len++] = '2'; |