diff options
author | George Hazan <george.hazan@gmail.com> | 2013-07-07 15:30:01 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-07-07 15:30:01 +0000 |
commit | 72c641debd5b1799b5be8547e3f30dc23ef69f4e (patch) | |
tree | b93cd65b91b1f291aba84fc8fa44b69cad5c09f2 /src/mir_core/langpack.cpp | |
parent | 89c299a541409dc27a57f8e7777aa14730f52115 (diff) |
manual rtrim not to touch trailing spaces
git-svn-id: http://svn.miranda-ng.org/main/trunk@5260 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core/langpack.cpp')
-rw-r--r-- | src/mir_core/langpack.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mir_core/langpack.cpp b/src/mir_core/langpack.cpp index efaf46a146..9f70065fb1 100644 --- a/src/mir_core/langpack.cpp +++ b/src/mir_core/langpack.cpp @@ -208,8 +208,11 @@ static void LoadLangPackFile(FILE *fp, char *line, UINT fileCp) if (IsEmpty(line) || line[0] == ';' || line[0] == 0)
continue;
+ size_t cbLen = strlen(line)-1;
+ if (line[cbLen] == '\n')
+ line[cbLen--] = 0;
+
if (line[0] == '#') {
- rtrim(line);
strlwr(line);
if ( !memcmp(line+1, "include", 7)) {
@@ -253,7 +256,7 @@ static void LoadLangPackFile(FILE *fp, char *line, UINT fileCp) ConvertBackslashes(line, fileCp);
- if (line[0] == '[' && line[ lstrlenA(line)-1 ] == ']') {
+ if (line[0] == '[' && line[cbLen] == ']') {
if (langPack.entryCount && langPack.entry[ langPack.entryCount-1].wszLocal == NULL)
langPack.entryCount--;
|