diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-06-21 20:01:52 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-06-21 20:01:52 +0000 |
commit | 4955a3b835c8b6d71fa836cdfc0ec5b82fa59ae0 (patch) | |
tree | 3229191afdf997f55a69f9deee2ec399dafe8f44 /src/mir_core | |
parent | 85b429453559d86491ac428a1028cbe4d5b382c9 (diff) |
fixed langpack authors crop
git-svn-id: http://svn.miranda-ng.org/main/trunk@9548 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/langpack.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/mir_core/langpack.cpp b/src/mir_core/langpack.cpp index b362dc34e3..48d2f15aaa 100644 --- a/src/mir_core/langpack.cpp +++ b/src/mir_core/langpack.cpp @@ -327,14 +327,23 @@ static int LoadLangDescr(LANGPACK_INFO &lpinfo, FILE *fp, char *line, int &start return 3;
*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); }
+ if (!lstrcmpA(line, "Language")) {
+ mir_snprintf(szLanguage, sizeof(szLanguage), "%s", pszColon);
+ lrtrim(szLanguage);
+ }
+ else if (!lstrcmpA(line, "Last-Modified-Using")) {
+ lpinfo.szLastModifiedUsing = pszColon;
+ lpinfo.szLastModifiedUsing.Trim();
+ }
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, "Author-email")) {
+ lpinfo.szAuthorEmail = pszColon;
+ lpinfo.szAuthorEmail.Trim();
+ }
else if (!lstrcmpA(line, "Locale")) {
char szBuf[20], *stopped;
@@ -347,7 +356,7 @@ static int LoadLangDescr(LANGPACK_INFO &lpinfo, FILE *fp, char *line, int &start }
}
- strncpy_s(lpinfo.szAuthors, SIZEOF(lpinfo.szAuthors), szAuthors, _TRUNCATE);
+ lpinfo.szAuthors = szAuthors;
MultiByteToWideChar(lpinfo.codepage, 0, szLanguage, -1, lpinfo.tszLanguage, SIZEOF(lpinfo.tszLanguage));
@@ -628,8 +637,6 @@ MIR_CORE_DLL(int) LoadLangPackModule(void) {
bModuleInitialized = TRUE;
- ZeroMemory(&langPack, sizeof(langPack));
-
hevChanged = CreateHookableEvent(ME_LANGPACK_CHANGED);
// look into mirandaboot.ini
|