diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-11-21 23:26:30 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-11-21 23:26:30 +0000 |
commit | 72d1549e8ba39a5939b7df8c4bc7beba7f7f1a18 (patch) | |
tree | f290f34f97684c4c699da0fcca2e60e8a1533e43 /libs/lmo/src/lmo_po2lmo.c | |
parent | 838c82fa9ea254c754f75f731c7698c82fa236e4 (diff) |
libs/lmo: canonize key strings before hashing them, fixes missing translations for original strings with line breaks or white spaces embedded
Diffstat (limited to 'libs/lmo/src/lmo_po2lmo.c')
-rw-r--r-- | libs/lmo/src/lmo_po2lmo.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/lmo/src/lmo_po2lmo.c b/libs/lmo/src/lmo_po2lmo.c index 380f18dd65..f6f3994232 100644 --- a/libs/lmo/src/lmo_po2lmo.c +++ b/libs/lmo/src/lmo_po2lmo.c @@ -52,12 +52,19 @@ static int extract_string(const char *src, char *dest, int len) { if( esc == 1 ) { + switch (src[pos]) + { + case '"': + case '\\': + off++; + break; + } dest[pos-off] = src[pos]; esc = 0; } else if( src[pos] == '\\' ) { - off++; + dest[pos-off] = src[pos]; esc = 1; } else if( src[pos] != '"' ) |