projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
libs/lmo: fix whitespace handling in string hashing, optimize code
[project/luci.git]
/
libs
/
lmo
/
src
/
lmo_po2lmo.c
diff --git
a/libs/lmo/src/lmo_po2lmo.c
b/libs/lmo/src/lmo_po2lmo.c
index
380f18d
..
f6f3994
100644
(file)
--- 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] != '"' )