From 72d1549e8ba39a5939b7df8c4bc7beba7f7f1a18 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 21 Nov 2012 23:26:30 +0000 Subject: libs/lmo: canonize key strings before hashing them, fixes missing translations for original strings with line breaks or white spaces embedded --- libs/lmo/src/lmo_po2lmo.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libs/lmo/src/lmo_po2lmo.c') 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] != '"' ) -- cgit v1.2.3