summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mir_core/langpack.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mir_core/langpack.cpp b/src/mir_core/langpack.cpp
index de8b22aa19..507eb06dc7 100644
--- a/src/mir_core/langpack.cpp
+++ b/src/mir_core/langpack.cpp
@@ -301,6 +301,7 @@ static void LoadLangPackFile(FILE *fp, char *line, UINT fileCp)
static int LoadLangDescr(LANGPACK_INFO &lpinfo, FILE *fp, char *line, int &startOfLine, UINT &fileCp)
{
char szLanguage[64]; szLanguage[0] = 0;
+ CMStringA szAuthors;
fgets(line, LANGPACK_BUF_SIZE, fp);
size_t lineLen = strlen(line);
@@ -333,7 +334,11 @@ static int LoadLangDescr(LANGPACK_INFO &lpinfo, FILE *fp, char *line, int &start
*pszColon++ = 0;
if (!lstrcmpA(line, "Language")) { mir_snprintf(szLanguage, sizeof(szLanguage), "%s", pszColon); lrtrim(szLanguage); }
else if (!lstrcmpA(line, "Last-Modified-Using")) { mir_snprintf(lpinfo.szLastModifiedUsing, sizeof(lpinfo.szLastModifiedUsing), "%s", pszColon); lrtrim(lpinfo.szLastModifiedUsing); }
- else if (!lstrcmpA(line, "Authors")) { mir_snprintf(lpinfo.szAuthors, sizeof(lpinfo.szAuthors), "%s", pszColon); lrtrim(lpinfo.szAuthors); }
+ else if (!lstrcmpA(line, "Authors")) {
+ if (!szAuthors.IsEmpty())
+ szAuthors.AppendChar(' ');
+ szAuthors.Append(lrtrim(pszColon));
+ }
else if (!lstrcmpA(line, "Author-email")) { mir_snprintf(lpinfo.szAuthorEmail, sizeof(lpinfo.szAuthorEmail), "%s", pszColon); lrtrim(lpinfo.szAuthorEmail); }
else if (!lstrcmpA(line, "Locale")) {
char szBuf[20], *stopped;
@@ -349,6 +354,8 @@ static int LoadLangDescr(LANGPACK_INFO &lpinfo, FILE *fp, char *line, int &start
}
}
+ strncpy_s(lpinfo.szAuthors, SIZEOF(lpinfo.szAuthors), szAuthors, _TRUNCATE);
+
MultiByteToWideChar(lpinfo.codepage, 0, szLanguage, -1, lpinfo.tszLanguage, SIZEOF(lpinfo.tszLanguage));
if (!lpinfo.tszLanguage[0] && (lpinfo.Locale == 0) || !GetLocaleInfo(lpinfo.Locale, LOCALE_SENGLANGUAGE, lpinfo.tszLanguage, sizeof(lpinfo.tszLanguage))) {