summaryrefslogtreecommitdiffstats
path: root/utils/storage
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2010-10-08 18:28:29 +0800
committerPeng Wu <alexepico@gmail.com>2010-10-08 18:28:29 +0800
commit93943b03f6d28f9c4f6f531c5976f5a5ebaa321e (patch)
tree84d898993dc40a8748cdba47fb74f14373af8e0b /utils/storage
parent2ee8b9ec3b8c67e6016a9c6dc1c2ac03a499eef7 (diff)
downloadlibpinyin-93943b03f6d28f9c4f6f531c5976f5a5ebaa321e.tar.gz
libpinyin-93943b03f6d28f9c4f6f531c5976f5a5ebaa321e.tar.xz
libpinyin-93943b03f6d28f9c4f6f531c5976f5a5ebaa321e.zip
fixes split_line
Diffstat (limited to 'utils/storage')
-rw-r--r--utils/storage/tag_utility.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/storage/tag_utility.cpp b/utils/storage/tag_utility.cpp
index 2315fb2..5fd0d90 100644
--- a/utils/storage/tag_utility.cpp
+++ b/utils/storage/tag_utility.cpp
@@ -118,6 +118,7 @@ static gchar ** split_line(const gchar * line){
continue;
}else if ( unichar == quote ) {
/* handles "\"". */
+ begin = cur = g_utf8_next_char(cur);
while (*cur) {
unichar = g_utf8_get_char(cur);
if ( unichar == backslash ) {
@@ -125,9 +126,8 @@ static gchar ** split_line(const gchar * line){
g_return_val_if_fail(*cur, NULL);
} else if ( unichar == quote ){
break;
- } else {
- cur = g_utf8_next_char(cur);
}
+ cur = g_utf8_next_char(cur);
}
gchar * tmp = g_strndup( begin, cur - begin);
token = g_strdup_printf(tmp);