Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLazydodo <github@lazydodo.com>2019-08-04 20:46:00 +0300
committerLazydodo <github@lazydodo.com>2019-08-04 20:46:00 +0300
commit37cef86f0d7a4c617d651f56b1c5347e7ec7d479 (patch)
tree23ec32157f2c0ad0909fcc892098e7d5391831a0 /source/blender/blentranslation
parentf08662d3ed0c0e0054d45b398a77106822d43a95 (diff)
Fix: msgfmt add support for cr-lf style line endings
linux did not recognize cr as a valid character. Reviewers: brecht Differential Revision: https://developer.blender.org/D5337
Diffstat (limited to 'source/blender/blentranslation')
-rw-r--r--source/blender/blentranslation/msgfmt/msgfmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blentranslation/msgfmt/msgfmt.c b/source/blender/blentranslation/msgfmt/msgfmt.c
index f226699d8bf..86d55e203d9 100644
--- a/source/blender/blentranslation/msgfmt/msgfmt.c
+++ b/source/blender/blentranslation/msgfmt/msgfmt.c
@@ -82,12 +82,12 @@ static char *trim(char *str)
return str;
}
- for (i = 0; i < len && ELEM(str[0], ' ', '\t', '\n'); str++, i++) {
+ for (i = 0; i < len && ELEM(str[0], ' ', '\t', '\r','\n'); str++, i++) {
/* pass */
}
char *end = &str[len - 1 - i];
- for (i = len; i > 0 && ELEM(end[0], ' ', '\t', '\n'); end--, i--) {
+ for (i = len; i > 0 && ELEM(end[0], ' ', '\t', '\r','\n'); end--, i--) {
/* pass */
}